Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- 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
Opaque type of MultiMaps.
Instances
Foldable (MultiMap k) Source # | |
Defined in Control.Distributed.Process.Extras.Internal.Containers.MultiMap fold :: Monoid m => MultiMap k m -> m # foldMap :: Monoid m => (a -> m) -> MultiMap k a -> m # foldMap' :: Monoid m => (a -> m) -> MultiMap k a -> m # foldr :: (a -> b -> b) -> b -> MultiMap k a -> b # foldr' :: (a -> b -> b) -> b -> MultiMap k a -> b # foldl :: (b -> a -> b) -> b -> MultiMap k a -> b # foldl' :: (b -> a -> b) -> b -> MultiMap k a -> b # foldr1 :: (a -> a -> a) -> MultiMap k a -> a # foldl1 :: (a -> a -> a) -> MultiMap k a -> a # toList :: MultiMap k a -> [a] # null :: MultiMap k a -> Bool # length :: MultiMap k a -> Int # elem :: Eq a => a -> MultiMap k a -> Bool # maximum :: Ord a => MultiMap k a -> a # minimum :: Ord a => MultiMap k a -> a # |
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.
Instances
(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).