Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapMaybe :: (a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap b

    monoidal-containers Data.IntMap.Monoidal.Strict

    No documentation available.

  2. mapMaybeWithKey :: (Int -> a -> Maybe b) -> MonoidalIntMap a -> MonoidalIntMap b

    monoidal-containers Data.IntMap.Monoidal.Strict

    No documentation available.

  3. mapMaybe :: forall k a b . (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b

    monoidal-containers Data.Map.Monoidal

    No documentation available.

  4. mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b

    monoidal-containers Data.Map.Monoidal

    No documentation available.

  5. mapMaybe :: forall k a b . (a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b

    monoidal-containers Data.Map.Monoidal.Strict

    No documentation available.

  6. mapMaybeWithKey :: (k -> a -> Maybe b) -> MonoidalMap k a -> MonoidalMap k b

    monoidal-containers Data.Map.Monoidal.Strict

    No documentation available.

  7. mapMaybe :: (a -> Maybe b) -> NEIntMap a -> IntMap b

    nonempty-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"
    

  8. mapMaybeWithKey :: (Key -> a -> Maybe b) -> NEIntMap a -> IntMap b

    nonempty-containers Data.IntMap.NonEmpty

    O(n). Map keys/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 k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
    mapMaybeWithKey f (fromList ((5,"a") :| [(3,"b")])) == Data.IntMap.singleton 3 "key : 3"
    

  9. mapMaybe :: (a -> Maybe b) -> NEMap k a -> Map k b

    nonempty-containers Data.Map.NonEmpty

    O(n). Map values and collect the Just results. Returns a potentially empty map (Map), because the function could potentially return Nothing on all items in the NEMap.

    let f x = if x == "a" then Just "new a" else Nothing
    mapMaybe f (fromList ((5,"a") :| [(3,"b")])) == Data.Map.singleton 5 "new a"
    

  10. mapMaybeWithKey :: (k -> a -> Maybe b) -> NEMap k a -> Map k b

    nonempty-containers Data.Map.NonEmpty

    O(n). Map keys/values and collect the Just results. Returns a potentially empty map (Map), because the function could potentially return Nothing on all items in the NEMap.

    let f k _ = if k < 5 then Just ("key : " ++ (show k)) else Nothing
    mapMaybeWithKey f (fromList ((5,"a") :| [(3,"b")])) == Data.Map.singleton 3 "key : 3"
    

Page 40 of many | Previous | Next