public intersection(other as HashSetSync<T>) as HashSetSync<T>:
Returns a new synchronized set containing elements present in both sets.
| Parameter | Description |
|---|---|
other | Elements to test against. |
A new synchronized hash set containing the intersection.
import klyn.collections
common = s:{1, 2, 3}.intersection(s:{2, 3, 4})
assert common.size == 2
assert 2 in common