Set
A Set represents a collection of unique values. It is empty by default.
let s be new SetIts constructor takes a list to initially fill the set. Duplicate items will automatically be ignored.
let fruits be list with "apple", "apple", "banana", "cherry"
let unique_fruits be new Set with just fruitsGetters
Returns the amount of values in the set.
A getter that returns an Iterator to iterate over the set's elements.
Methods
Returns a string representation of the set as an array in JSON format.
Returns a new list with all of the items in the set.
Removes all values from the set.
Inserts a value into the set, if not already present.
Removes a value from the set, if not already present.
Returns true if the given value already exists in the set.
print "hello world"