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.

  1. mapMaybeMissing :: forall (f :: Type -> Type) x y . Applicative f => (Key -> x -> Maybe y) -> WhenMissing f x y

    containers Data.IntMap.Merge.Strict

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (k -> x -> Maybe y) -> SimpleWhenMissing k x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

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

    containers Data.IntMap.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"
    

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

    containers Data.IntMap.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"
    

  4. mapMaybeMissing :: forall (f :: Type -> Type) k x y . Applicative f => (k -> x -> Maybe y) -> WhenMissing f k x y

    containers Data.Map.Internal

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (k -> x -> Maybe y) -> SimpleWhenMissing k x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

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

    containers Data.Map.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"
    

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

    containers Data.Map.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"
    

  7. mapMaybeMissing :: forall (f :: Type -> Type) k x y . Applicative f => (k -> x -> Maybe y) -> WhenMissing f k x y

    containers Data.Map.Merge.Lazy

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (k -> x -> Maybe y) -> SimpleWhenMissing k x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

  8. mapMaybeMissing :: forall (f :: Type -> Type) k x y . Applicative f => (k -> x -> Maybe y) -> WhenMissing f k x y

    containers Data.Map.Merge.Strict

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (k -> x -> Maybe y) -> SimpleWhenMissing k x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

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

    containers Data.Map.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"
    

  10. mapMaybeMissing :: forall (f :: Type -> Type) k x y . Applicative f => (k -> x -> Maybe y) -> WhenMissing f k x y

    containers Data.Map.Strict.Internal

    Map over the entries whose keys are missing from the other map, optionally removing some. This is the most powerful SimpleWhenMissing tactic, but others are usually more efficient.

    mapMaybeMissing :: (k -> x -> Maybe y) -> SimpleWhenMissing k x y
    
    mapMaybeMissing f = traverseMaybeMissing (\k x -> pure (f k x))
    
    but mapMaybeMissing uses fewer unnecessary Applicative operations.

Page 14 of many | Previous | Next