Hoogle Search

Within LTS Haskell 24.39 (ghc-9.10.3)

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

  1. zipWithMaybeAMatched :: (Key -> x -> y -> f (Maybe z)) -> WhenMatched f x y z

    ghc-lib-parser GHC.Data.Word64Map.Internal

    When a key is found in both maps, apply a function to the key and values, perform the resulting action, and maybe use the result in the merged map. This is the fundamental WhenMatched tactic.

  2. zipWithMaybeMatched :: forall (f :: Type -> Type) x y z . Applicative f => (Key -> x -> y -> Maybe z) -> WhenMatched f x y z

    ghc-lib-parser GHC.Data.Word64Map.Internal

    When a key is found in both maps, apply a function to the key and values and maybe use the result in the merged map.

    zipWithMaybeMatched
    :: (Key -> x -> y -> Maybe z)
    -> SimpleWhenMatched x y z
    

  3. mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.Lazy

    Map values and collect the Just results.

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

  4. mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.Lazy

    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"
    

  5. traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)

    ghc-lib-parser GHC.Data.Word64Map.Lazy

    Traverse keys/values and collect the Just results.

  6. mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.Strict

    Map values and collect the Just results.

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

  7. mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.Strict

    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"
    

  8. traverseMaybeWithKey :: Applicative f => (Key -> a -> f (Maybe b)) -> Word64Map a -> f (Word64Map b)

    ghc-lib-parser GHC.Data.Word64Map.Strict

    Traverse keys/values and collect the Just results.

  9. mapMaybe :: (a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.Strict.Internal

    Map values and collect the Just results.

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

  10. mapMaybeWithKey :: (Key -> a -> Maybe b) -> Word64Map a -> Word64Map b

    ghc-lib-parser GHC.Data.Word64Map.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"
    

Page 202 of many | Previous | Next