Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
monoidal-containers Data.Map.Monoidal No documentation available.
-
monoidal-containers Data.Map.Monoidal No documentation available.
mapEitherWithKey :: (k -> a -> Either b c) -> MonoidalMap k a -> (MonoidalMap k b, MonoidalMap k c)monoidal-containers Data.Map.Monoidal No documentation available.
mapKeys :: forall k1 k2 a . Ord k2 => (k1 -> k2) -> MonoidalMap k1 a -> MonoidalMap k2 amonoidal-containers Data.Map.Monoidal No documentation available.
mapKeysMonotonic :: (k1 -> k2) -> MonoidalMap k1 a -> MonoidalMap k2 amonoidal-containers Data.Map.Monoidal O(n). mapKeysMonotonic f s == mapKeys f s, but works only when f is strictly increasing (both monotonic and injective). That is, for any values x and y, if x < y then f x < f y and f is injective (i.e. it never maps two input keys to the same output key). The precondition is not checked. Semi-formally, we have:
and [x < y ==> f x < f y | x <- ls, y <- ls] ==> mapKeysMonotonic f s == mapKeys f s where ls = keys s
This means that f maps distinct original keys to distinct resulting keys. This function has better performance than mapKeys.mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")]) == fromList [(6, "b"), (10, "a")] valid (mapKeysMonotonic (\ k -> k * 2) (fromList [(5,"a"), (3,"b")])) == True valid (mapKeysMonotonic (\ _ -> 1) (fromList [(5,"a"), (3,"b")])) == False
-
monoidal-containers Data.Map.Monoidal No documentation available.
mapMaybe :: forall k a b . (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal No documentation available.
mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal No documentation available.
mapWithKey :: (k -> a -> b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal No documentation available.
mapAccum :: forall k a b c . (a -> b -> (a, c)) -> a -> MonoidalMap k b -> (a, MonoidalMap k c)monoidal-containers Data.Map.Monoidal.Strict No documentation available.