1
ハックSet
にはdifference
メソッドがありますが、intersect
などの方法はありません。ハック言語 - 交差点を設定する
2組の交差点を取得するにはどうすればよいですか?
$set1 = Set { 'a', 'x' };
$set2 = Set { 'b', 'c', 'x', 'y' };
$intersection = ??? // Set { 'x' }
ドキュメント:https://docs.hhvm.com/hack/reference/class/HH.Set/