Hoogle Search
Within LTS Haskell 24.56 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapMaybe :: (a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal.Strict No documentation available.
mapMaybeWithKey :: (Int -> a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap bmonoidal-containers Data.IntMap.Monoidal.Strict 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.
-
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.Strict No documentation available.
mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k bmonoidal-containers Data.Map.Monoidal.Strict No documentation available.
-
monoidal-containers Data.Map.Monoidal.Strict No documentation available.
deleteMaybe :: Key -> NEIntMap a -> Maybe (NEIntMap a)nonempty-containers Data.IntMap.NonEmpty O(log n). Delete a key and its value from the non-empty map, returning Nothing if the result would be empty. This is more efficient than nonEmptyMap . delete k because it avoids converting the known-minimum representation back through IntMap when the deleted key is not the minimum.
mapMaybe :: (a -> Maybe b) -> NEIntMap a -> IntMap bnonempty-containers Data.IntMap.NonEmpty O(n). Map values and collect the Just results. Returns a potentially empty map (IntMap), because the function could potentially return Nothing on all items in the NEIntMap.
let f x = if x == "a" then Just "new a" else Nothing mapMaybe f (fromList ((5,"a") :| [(3,"b")])) == Data.IntMap.singleton 5 "new a"