Sky.Core.Set
Sky.Core.Set — unordered set of unique elements (Layer 3 Sky source).
Values
diff : Set comparable -> Set comparable -> Set comparable
`diff a b` — every element in `a` BUT NOT in `b`.
empty : Set a
The empty set.
fromList : List comparable -> Set comparable
Build a set from a list, de-duplicating along the way.
insert : comparable -> Set comparable -> Set comparable
`insert x s` — add `x` to `s`. No-op if already present.
intersect : Set comparable -> Set comparable -> Set comparable
`intersect a b` — every element in BOTH `a` and `b`.
member : comparable -> Set comparable -> Bool
`member x s` — `True` iff `x` is in `s`.
remove : comparable -> Set comparable -> Set comparable
`remove x s` — drop `x` from `s`. No-op if absent.
size : Set a -> Int
Number of distinct elements.
toList : Set a -> List a
All elements in the set (unsorted).
union : Set comparable -> Set comparable -> Set comparable
`union a b` — every element in `a` OR `b`.