Set type

Represents a set of items

Direct parent types

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

Methods

+(a:Set, b:Set) Source: autoload/Set.ngs:52
Set union

Returns

Set
-(a:Set, b:Set) Source: autoload/Set.ngs:46
Set difference

Returns

Set
<=(a:Set, b:Set) Source: autoload/Set.ngs:58
Check whether all values in a are also in b
Bool(s:Set) Source: autoload/Set.ngs:39
Check whether the set is not empty
collector(s:Set, body:Fun) Source: autoload/Set.ngs:77
Defines collector { ... collect(...) ... } behaviour for Set.
copy(s:Set) Source: autoload/Set.ngs:66
Undocumented
each(s:Set, cb:Fun) Source: autoload/Set.ngs:30
Call cb for each value in the set

Returns

s
in(x:Any, s:Set) Source: autoload/Set.ngs:36
Check if the value is in the set

Returns

Bool
init(s:Set) Source: autoload/Set.ngs:7
Initialize a set
init(s:Set, e:Eachable1) Source: autoload/Set.ngs:12
Convert array to set
inspect(a:Set) Source: autoload/Set.ngs:73
Inspect Set

Returns

Lines
len(s:Set) Source: autoload/Set.ngs:25
Get number of items in the set

Returns

Int
push(s:Set, v:Any) Source: autoload/Set.ngs:19
Add an element to the set

Returns

s
Str(s:Set) Source: autoload/Set.ngs:42
Convert the set to a human-readable representation