- (<>) :: Monoid m => m -> m -> m
- class Foldable f => Collection f where
- unions :: (Ord a, Collection f) => [f a] -> f a
- fromList :: (Ord a, Collection f) => [a] -> f a
- filterC :: (Collection f, Ord a) => f (Maybe a) -> f a
- newtype Multiset a = Multiset (Map a Int)
Documentation
class Foldable f => Collection f whereSource
Collections are foldable types that support empty, singleton, union, and map operations. The result of a free variable calculation may be any collection. Instances are provided for lists and sets.
Collection [] | Lists are containers under concatenation. Lists preserve ordering and multiplicity of elements. |
Collection Set | Sets are containers under union, which preserve only occurrence, not multiplicity or ordering. |
Collection Multiset | Multisets are containers which preserve multiplicity but not ordering. |
unions :: (Ord a, Collection f) => [f a] -> f aSource
Combine a list of containers into one.
fromList :: (Ord a, Collection f) => [a] -> f aSource
Create a collection from a list of elements.
filterC :: (Collection f, Ord a) => f (Maybe a) -> f aSource
Remove the Nothing
s from a collection.