TrieSet
Functional set
Sets are partial maps from element type to unit type, i.e., the partial map represents the set with its domain.
Hash
type Hash = Hash.Hash
Set
type Set<T> = Trie.Trie<T, ()>
empty
func empty<T>() : Set<T>
Empty set.
size
func size<T>(s : Set<T>) : Nat
The number of set elements, set’s cardinality.
union
[Set union](https://en.wikipedia.org/wiki/Union_(set_theory)).
diff
[Set difference](https://en.wikipedia.org/wiki/Difference_(set_theory)).
intersect
[Set intersection](https://en.wikipedia.org/wiki/Intersection_(set_theory)).
toArray
func toArray<T>(s : Set<T>) : [T]