Iterates over values in the set.
Returns a copy of this instance. Shallow or deep copies are implementation specific.
Returns an empty/blank instance of same type (with possibly same config, if any).
Returns an iterable of [v,v] pairs for every value v
in the set.
Returns true
if this value is equivalent to o
. Also see {@link ICompare.compare} and {@link IHash.hash}.
The value args given to the callback fn
MUST be treated as readonly/immutable. This could be enforced via TS, but would break ES6 Set interface contract.
Returns the canonical value for x
, if present. If the set contains no equivalent for x
, returns notFound
.
search key
default value
Despite its name, returns an iterable of the values in the set.
Returns an iterable of values in the set.
Generated using TypeDoc
An alternative set implementation to the native ES6 Set type. Uses customizable equality/equivalence predicate and so is more useful when dealing with structured data. Implements full API of native Set and by the default uses equiv for equivalence checking.
Additionally, the type also implements the ICopy, IEmpty and IEquiv interfaces itself.