public difference(other as HashSetSync<T>) as HashSetSync<T>:
Returns a new synchronized set containing elements from this set that are absent from other.
| Parameter | Description |
|---|---|
other | Elements to remove from the copy. |
A new synchronized hash set containing the difference.
import klyn.collections
remaining = s:{1, 2, 3}.difference(s:{2})
assert remaining.size == 2
assert 2 not in remaining