Sets
A Set is an orderless aggregate that contains unique elements only. The keys in a Quarrel table fit these requirements. Therefore, Sets are really just tables where the keys are the only important piece.
#
How to...#
create a set#
add a value to a set#
check if set contains a value#
remove a value from a set#
convert to a table#
OperatorsBinary and unary operations that act specifically on Sets.
-
#
Resolves to the set difference or all the elements of the x
Set that aren't in the y
Set.
#
Examples|
Resolves to the set union or all the elements of the x
Set that aren't in the y
Set.
#
Examples&
#
Resolves to the set intersection or all the elements of the x
and y
Sets that are in both sets.
#
Examples==
#
Resolves to true
if the left Set is an exact copy of the right Set
#
Examples<>
#
Resolves to false
if the left Set is an exact copy of the right Set
#
Examples>>
#
Resolves to true
if the left Set is a strict superset of the right Set
#
Examples<<
#
Resolves to true
if the left Set is a strict subset of the right Set
>=
#
Resolves to true
if the left Set is a superset of or equal to the right Set
#
Examples<=
#
Resolves to true
if the left Set is a subset of or equal to the right Set
#
Examples***
#
Picks a number of random elements from the set. Anything integer greater than 1 will return a list of picked elements instead of just one.
#
Examples#
Method OperatorsMethod operations that are performed on Set containers.
[x]
#
Check if the set contains this value
#
Examples[+]
#
Add a value to a set
#
Examples[@]
#
Return the size of the set
#
Examples[!]
#
Delete a value in a set