klyn.collections.HashSet.difference
method

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

Description

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

Parameters

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

Returns

A new hash set containing the difference.

Example

    import klyn.collections

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