Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- data MultiMap k v
- class (Eq a, Hashable a) => Insertable a
- empty :: MultiMap k v
- insert :: forall k v. (Insertable k, Insertable v) => k -> v -> MultiMap k v -> MultiMap k v
- member :: Insertable k => k -> MultiMap k a -> Bool
- lookup :: Insertable k => k -> MultiMap k v -> Maybe [v]
- delete :: Insertable k => k -> MultiMap k v -> Maybe ([v], MultiMap k v)
- filter :: forall k v. Insertable k => (v -> Bool) -> MultiMap k v -> MultiMap k v
- filterWithKey :: forall k v. Insertable k => (k -> v -> Bool) -> MultiMap k v -> MultiMap k v
- foldrWithKey :: (k -> v -> a -> a) -> a -> MultiMap k v -> a
- toList :: MultiMap k v -> [(k, v)]
- size :: MultiMap k v -> Int
Documentation
class (Eq a, Hashable a) => Insertable a Source #
Class of things that can be inserted in a map or
a set (of mapped values), for which instances of
Eq
and Hashable
must be present.
(Eq a, Hashable a) => Insertable a Source # | |
insert :: forall k v. (Insertable k, Insertable v) => k -> v -> MultiMap k v -> MultiMap k v Source #
filterWithKey :: forall k v. Insertable k => (k -> v -> Bool) -> MultiMap k v -> MultiMap k v Source #
foldrWithKey :: (k -> v -> a -> a) -> a -> MultiMap k v -> a Source #
O(n) Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).