set
a collection with no repeats and no order
1# set2set(1, 2, 3)3# from values4set(1, 2, 2)set(1, 2)Example outputCtrl+Enter to run
syntax
Section titled “syntax”1# | & - combine sets2set(1, 2) | set(2, 3)set(1, 2, 3)Example outputCtrl+Enter to run
Functions that take it
Section titled “Functions that take it”listconvert to a list: a string’s characters, a map’s [key, value] pairs, a set’s items, a table’s rows as maps, or a copy of a listlenhow many items a list, map or set has, characters a string has, or bytes a bytes value hascontainswhether x is in v: text (or a regex match) in a string, an item in a list or set, or a key in a mapsorta sorted copy, smallest firstsort_desca sorted copy, largest first, with the function working as in sortseta set of a list’s items or a string’s characters, or of all the arguments, with repeats droppedpower_setevery set that can be made from some of s’s items, including the empty set and s itself, smallest firstcartesianevery pair [x, y] with x from a and y from bis_subsetwhether every item of a is also in bis_supersetwhether a has every item of bis_disjointwhether a and b have no items in commonaddadd v to the set, changing it, and return the setremoveremove v from the set if it’s there, changing it, and return the set
Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.