-
Notifications
You must be signed in to change notification settings - Fork 0
stdset
Provides primitives to use set -datastructure. Set datastructure is actually implemented as map.
Creates new empty set.
type : function
Format:
call(stdset.newset) -> <set>
Returns whether set is empty (true if empty, false otherwise).
type : function
Format:
call(stdset.is-empty <set>) -> <bool>
Returns number of items in set (int).
type : function
Format:
call(stdset.setlen <set>) -> <int>
Returns set items in list.
type : function
Format:
call(stdset.as-list <set>) -> <list>
Returns true if item is in set, false otherwise.
type : function
Format:
call(stdset.has-item <set>) -> <bool>
Removes item from set (if it is in it).
type : function
Format:
call(stdset.remove-from-set <set> <item-value>) -> <set>
Adds one item to set.
type : function
Format:
call(stdset.add-to-set <set> <item-value>) -> <set>
Adds items in list (2nd argument) to set.
type : function
Format:
call(stdset.list-to-set <set> <items-list>) -> <set>
Creates union of two sets given as arguments.
type : function
Format:
call(stdset.union <set> <set>) -> <set>
Creates intersection set of two sets given as arguments.
type : function
Format:
call(stdset.intersection <set> <set>) -> <set>
Returns set with elements in first set (1st argument) but not in second set (2nd arguement).
type : function
Format:
call(stdset.difference <set> <set>) -> <set>
Return true if second set (2nd argument) is subset of first set (1st argument), false otherwise.
type : function
Format:
call(stdset.is-subset <set> <set>) -> <bool>
Returns true if two sets given as arguments are having same items, false otherwise.
type : function
Format:
call(stdset.equal <set> <set>) -> <bool>