A set of unique values. The values can be any type, and the comparison is
done using a function compare : value -> comparable.
Insert, remove, and query operations all take O(log n) time.
Get the union of two sets. Keep all values.
Get the intersection of two sets. Keeps values that appear in both sets.
Get the difference between the first set and the second. Keeps values that do not appear in the second set.
Convert a list into a set, removing any duplicates.
Map a function onto a set, creating a new set with no duplicates.
Fold over the values in a set, in order from lowest to highest.
Fold over the values in a set, in order from highest to lowest.
Create a new set consisting only of elements which satisfy a predicate.
Represents a set of unique values together with the compare function