Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
monoidal-containers Data.Map.Monoidal.Strict No documentation available.
mapMaybe :: forall k a b . (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal.Strict No documentation available.
mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal.Strict No documentation available.
mapWithKey :: (k -> a -> b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal.Strict No documentation available.
mapKeys :: Ord k2 => (k1 -> k2) -> MultiMap k1 a -> MultiMap k2 amultimap Data.MultiMap mapKeys f s is the multimap obtained by applying f to each key of s.
mapWithKey :: (k -> a -> b) -> MultiMap k a -> MultiMap k bmultimap Data.MultiMap Map a function over all key/value pairs in the map.
mapAccum :: (a -> b -> (a, c)) -> a -> NEIntMap b -> (a, NEIntMap c)nonempty-containers Data.IntMap.NonEmpty O(n). The function mapAccum threads an accumulating argument through the map in ascending order of keys.
let f a b = (a ++ b, b ++ "X") mapAccum f "Everything: " (fromList ((5,"a") :| [(3,"b")])) == ("Everything: ba", fromList ((3, "bX") :| [(5, "aX")]))mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> NEIntMap b -> (a, NEIntMap c)nonempty-containers Data.IntMap.NonEmpty O(n). The function mapAccumRWithKey threads an accumulating argument through the map in descending order of keys.
mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> NEIntMap b -> (a, NEIntMap c)nonempty-containers Data.IntMap.NonEmpty O(n). The function mapAccumWithKey threads an accumulating argument through the map in ascending order of keys.
let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X") mapAccumWithKey f "Everything:" (fromList ((5,"a") :| [(3,"b")])) == ("Everything: 3-b 5-a", fromList ((3, "bX") :| [(5, "aX")]))mapEither :: (a -> Either b c) -> NEIntMap a -> These (NEIntMap b) (NEIntMap c)nonempty-containers Data.IntMap.NonEmpty O(n). Map values and separate the Left and Right results. Returns a These with potentially two non-empty maps:
- This n1 means that the results were all Left.
- That n2 means that the results were all Right.
- These n1 n2 gives n1 (the map where the results were Left) and n2 (the map where the results were Right)
let f a = if a < "c" then Left a else Right a mapEither f (fromList ((5,"a") :| [(3,"b"), (1,"x"), (7,"z")])) == These (fromList ((3,"b") :| [(5,"a")])) (fromList ((1,"x") :| [(7,"z")])) mapEither (\ a -> Right a) (fromList ((5,"a") :| [(3,"b"), (1,"x"), (7,"z")])) == That (fromList ((5,"a") :| [(3,"b"), (1,"x"), (7,"z")]))