Set type

Represents a set of items

Direct parent types

Eachable1
Eachable which each() calls the callback with one argument
Direct subtypes: 18

Methods

+(a:Set, b:Set) Source: stdlib.ngs:2435
Set union

Returns

Set
-(a:Set, b:Set) Source: stdlib.ngs:2428
Set difference

Returns

Set
<=(a:Set, b:Set) Source: stdlib.ngs:2459
Check whether all values in a are also in b
==(a:Set, b:Set) Source: stdlib.ngs:2451
Undocumented
>=(a:Set, b:Set) Source: stdlib.ngs:2467
Check whether all values in b are also in a
Bool(s:Set) Source: stdlib.ngs:2421
Check whether the set is not empty
collector(s:Set, body:Fun) Source: stdlib.ngs:2479
Defines collector { ... collect(...) ... } behaviour for Set.
copy(s:Set) Source: stdlib.ngs:2484
Make shallow copy of a Set
each(s:Set, cb:Fun) Source: stdlib.ngs:2414
Call cb for each value in the set

Returns

s
in(x:Any, s:Set) Source: stdlib.ngs:2418
Check if the value is in the set

Returns

Bool
init(s:Set) Source: stdlib.ngs:2395
Initialize a set
init(s:Set, e:Eachable1) Source: stdlib.ngs:2400
Convert array to set
inspect(path:Arr, a:Set) Source: stdlib.ngs:2472
Inspect Set

Returns

Arr of Str
intersect(a:Set, b:Set) Source: stdlib.ngs:2445
Set intersection

Returns

Set
Iter(s:Set) Source: autoload/globals/Iter.ngs:368
Iterator for Set. Currently implemented as ArrIter for the Set elements.

Returns

ArrIter
len(s:Set) Source: stdlib.ngs:2410
Get number of items in the set

Returns

Int
push(s:Set, v:Any) Source: stdlib.ngs:2406
Add an element to the set

Returns

s
Str(s:Set) Source: stdlib.ngs:2424
Convert the set to a human-readable representation