Copyright | (c) Atze van der Ploeg 2013 |
---|---|
License | BSD-style |
Maintainer | [email protected] |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Data.HKeySet
Description
A set of HKey
s
- data HKeySet
- empty :: HKeySet
- singleton :: HKey s a -> HKeySet
- union :: HKeySet -> HKeySet -> HKeySet
- unions :: Foldable f => f HKeySet -> HKeySet
- null :: HKeySet -> Bool
- size :: HKeySet -> Int
- member :: HKey s a -> HKeySet -> Bool
- insert :: HKey x a -> HKeySet -> HKeySet
- delete :: HKey s a -> HKeySet -> HKeySet
- difference :: HKeySet -> HKeySet -> HKeySet
- intersection :: HKeySet -> HKeySet -> HKeySet
- overlap :: HMap -> HKeySet -> Bool
- sameKeys :: HMap -> HKeySet -> Bool
- removeKeys :: HMap -> HKeySet -> HMap
Documentation
Construction
Combine
union :: HKeySet -> HKeySet -> HKeySet Source #
O(n+m) Construct a key set containing all elements from both sets.
To obtain good performance, the smaller set must be presented as the first argument.
unions :: Foldable f => f HKeySet -> HKeySet Source #
Construct a key set containing all elements from a list of key sets.
Basic interface
delete :: HKey s a -> HKeySet -> HKeySet Source #
O(min(n,W)) Remove the specified value from this set if present.
Difference and intersection
difference :: HKeySet -> HKeySet -> HKeySet Source #
O(n) Difference of two sets. Return elements of the first set not existing in the second.
intersection :: HKeySet -> HKeySet -> HKeySet Source #
O(n) Intersection of two sets. Return elements present in both the first set and the second.