Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Map a
- lookup :: Word8 -> Map a -> Maybe a
- null :: Map a -> Bool
- size :: Map a -> Int
- empty :: Map a
- singleton :: Word8 -> a -> Map a
- union :: Map a -> Map a -> Map a
- unionWith :: (a -> a -> a) -> Map a -> Map a -> Map a
- insert :: Word8 -> a -> Map a -> Map a
- insertWith :: (a -> a -> a) -> Word8 -> a -> Map a -> Map a
- foldrWithKeys :: (Word8 -> a -> b -> b) -> b -> Map a -> b
- foldl' :: (b -> a -> b) -> b -> Map a -> b
- traverse_ :: Applicative m => (a -> m b) -> Map a -> m ()
- toList :: Map a -> [(Word8, a)]
- fromList :: [(Word8, a)] -> Map a
Documentation
A map whose keys are 8-bit words.
insertWith :: (a -> a -> a) -> Word8 -> a -> Map a -> Map a Source #
Insert with a function, combining new value and old value.
will insert the pair insertWith
f key value mp(key, value)
into mp
if key
does not exist in the map.
If the key does exist, the function will insert the pair
(key, f new_value old_value)
.
foldrWithKeys :: (Word8 -> a -> b -> b) -> b -> Map a -> b Source #
traverse_ :: Applicative m => (a -> m b) -> Map a -> m () Source #