empty
Set a
Create an empty set.
singleton
a -> Set a
Create a set with one value.
insert
a -> Set a -> Set a
Insert a value into a set.
remove
Remove a value from a set. If the value is not found, no changes are made.
member
a -> Set a -> Bool
Determine if a value is in a set.
union
Set a -> Set a -> Set a
Get the union of two sets. Keep all values.
intersect
Get the intersection of two sets. Keeps values that appear in both sets.
diff
Get the difference between the first set and the second. Keeps values that do not appear in the second set.
map
(a -> b) -> Set a -> Set b
Map a function onto a set, creating a new set with no duplicates.
foldl
(a -> b -> b) -> b -> Set a -> b
Fold over the values in a set, in order from lowest to highest.
foldr
Fold over the values in a set, in order from highest to lowest.
toList
Set a -> [a]
Convert a set into a list.
fromList
[a] -> Set a
Convert a list into a set, removing any duplicates.
Build
Query
Combine
Lists
Morph
Set