Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k bcontainers Data.Map.Strict.Internal Map keys/values and collect the Just results.
let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing mapMaybeWithKey f (fromList [(5,"a"), (3,"b")]) == singleton 3 "key : 3"
mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n btransformers Control.Monad.Trans.Maybe Transform the computation inside a MaybeT.
mapMaybeWithKey :: (Key -> v -> Maybe u) -> KeyMap v -> KeyMap uaeson Data.Aeson.KeyMap Map values and collect the Just results.
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2unordered-containers Data.HashMap.Internal Transform this map by applying a function to every value and retaining only some of them.
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2unordered-containers Data.HashMap.Internal.Strict Transform this map by applying a function to every value and retaining only some of them.
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2unordered-containers Data.HashMap.Lazy Transform this map by applying a function to every value and retaining only some of them.
mapMaybeWithKey :: (k -> v1 -> Maybe v2) -> HashMap k v1 -> HashMap k v2unordered-containers Data.HashMap.Strict Transform this map by applying a function to every value and retaining only some of them.
mapMaybePrimArray :: (Prim a, Prim b) => (a -> Maybe b) -> PrimArray a -> PrimArray bprimitive Data.Primitive.PrimArray Map over a primitive array, optionally discarding some elements. This has the same behavior as Data.Maybe.mapMaybe.
-
primitive Data.Primitive.PrimArray Map over the primitive array, keeping the elements for which the applicative predicate provides a Just.
-
primitive Data.Primitive.PrimArray Map over the primitive array, keeping the elements for which the monadic predicate provides a Just.