sets are used to store an unordered collection of unique values of the same type, primarily for the purpose of tracking visited values, and can be taken from set literals.
The type of a list is determined by the first value in the literal or
strings are a form of lists with character values
set = unordered_set
sorted_set
unordered_multiset
sorted_multiset
(3) {}um
{[comma group]}us
{[singleton]}us
(3) {}os
{[comma group]}us
{[singleton]}us
(3) {}us
{[comma group]}us
{[singleton]}us
(4) {}s
{[comma group]}s
{[singleton]}s
(1) An unordered multiset
(2) A sorted multiset
(3) An unordered set
(4) A sorted set
collection
#[set]
returns the number of elements in [set]
[set]+[set]
returns the union of the two sets
[set]+[element]
returns the set with [element] added
[list]-[element]
returns the set with [element] removed
[list]*[number]
repeats the elements of [list] [number] times
[list]*[number]
returns a list with the elements of [list] repeated [number] times
|[list]|
returns the norm (square root of the sum of all the squares) of the elements in [list]
[list]=[list]
returns whether all elements are equivalent in both lists
[list]!=[list]
returns whether any element is not equivalent in both lists
[list][[number]]
returns the element that is [number] into the list (starting from 0)
[element] in [list]
returns whether [element] is contained in the list
keeps:
[variable]=[value]
[variable]==[value]
[value]<<[value]