map :: forall a b. Hashable b => (a -> b) -> HashSet a -> HashSet b
Construct a new set by applying a function to each element of an input set.
If distinct inputs map to the same output, this changes the
cardinality of the set, therefore hash set is not a
Also, the order in which elements appear in the new set is
entirely dependent on the hash function for type
intersection :: forall a. Hashable a => HashSet a -> HashSet a -> HashSet a
Intersect two sets.
difference :: forall a. Hashable a => HashSet a -> HashSet a -> HashSet a
Difference of two sets.
Also known as set minus or relative complement. Returns a set of all elements of the left set that are not in the right set.
fromFoldable :: forall f a. Foldable f => Hashable a => f a -> HashSet a
Create a set from a foldable structure.
toUnfoldable :: forall f a. Unfoldable f => HashSet a -> f a
Turn a set into an unfoldable functor.
You probably want to use
toArray instead, especially if you
want to get an array out.
Foldableinstance is best used with a commutative function/
Monoid, since hash sets do not guarantee any particular order.