klyn.collections.HashSetSync.difference
method

    public difference(other as HashSetSync<T>) as HashSetSync<T>:

Description

Returns a new synchronized set containing elements from this set that are absent from `other`.

Parameters

Parameter | Description
--- | ---
`other` | Elements to remove from the copy.

Returns

A new synchronized hash set containing the difference.

Example

    import klyn.collections

    remaining = s:{1, 2, 3}.difference(s:{2})
    assert remaining.size == 2
    assert 2 not in remaining