Hoogle Search

Within LTS Haskell 24.19 (ghc-9.10.3)

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

  1. mapWithKey :: (k -> a -> b) -> Map k a -> Map k b

    containers Data.Map.Strict.Internal

    Map a function over all values in the map.

    let f key x = (show key) ++ ":" ++ x
    mapWithKey f (fromList [(5,"a"), (3,"b")]) == fromList [(3, "3:b"), (5, "5:a")]
    

  2. mapWithIndex :: (Int -> a -> b) -> Seq a -> Seq b

    containers Data.Sequence

    A generalization of fmap, mapWithIndex takes a mapping function that also depends on the element's index, and applies it to every element in the sequence.

  3. mapWithIndex :: (Int -> a -> b) -> Seq a -> Seq b

    containers Data.Sequence.Internal

    A generalization of fmap, mapWithIndex takes a mapping function that also depends on the element's index, and applies it to every element in the sequence.

  4. mapMonotonic :: (a -> b) -> Set a -> Set b

    containers Data.Set

    The mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:

    and [x < y ==> f x < f y | x <- ls, y <- ls]
    ==> mapMonotonic f s == map f s
    where ls = toList s
    

  5. mapMonotonic :: (a -> b) -> Set a -> Set b

    containers Data.Set.Internal

    The mapMonotonic f s == map f s, but works only when f is strictly increasing. The precondition is not checked. Semi-formally, we have:

    and [x < y ==> f x < f y | x <- ls, y <- ls]
    ==> mapMonotonic f s == map f s
    where ls = toList s
    

  6. mapLift :: (f a -> g a) -> Lift f a -> Lift g a

    transformers Control.Applicative.Lift

    Apply a transformation to the other computation.

  7. mapAccum :: ((a, w) -> (b, w)) -> Accum w a -> Accum w b

    transformers Control.Monad.Trans.Accum

    Map both the return value and output of a computation using the given function.

  8. mapAccumT :: (m (a, w) -> n (b, w)) -> AccumT w m a -> AccumT w n b

    transformers Control.Monad.Trans.Accum

    Map both the return value and output of a computation using the given function.

  9. mapCont :: (r -> r) -> Cont r a -> Cont r a

    transformers Control.Monad.Trans.Cont

    Apply a function to transform the result of a continuation-passing computation.

  10. mapExcept :: (Either e a -> Either e' b) -> Except e a -> Except e' b

    transformers Control.Monad.Trans.Except

    Map the unwrapped computation using the given function.

Page 63 of many | Previous | Next