Var field implementation of sets of (small) natural numbers.
- type VarSet = Set Integer
- union :: Ord a => Set a -> Set a -> Set a
- unions :: Ord a => [Set a] -> Set a
- member :: Ord a => a -> Set a -> Bool
- empty :: Set a
- delete :: Ord a => a -> Set a -> Set a
- singleton :: a -> Set a
- fromList :: Ord a => [a] -> Set a
- toList :: Set a -> [a]
- isSubsetOf :: Ord a => Set a -> Set a -> Bool
- subtract :: Integer -> VarSet -> VarSet
O(n+m). The union of two sets, preferring the first set when
equal elements are encountered.
The implementation uses the efficient hedge-union algorithm.
Hedge-union is more efficient on (bigset
O(n+m). Is this a subset?
(s1 tells whether
s1 is a subset of