Hoogle Search

Within LTS Haskell 24.41 (ghc-9.10.3)

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

  1. mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)

    incipit-base Incipit.Base

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

    Examples

    mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

  2. mapM :: MonadParallel m => (a -> m b) -> [a] -> m [b]

    monad-parallel Control.Monad.Parallel

    Like mapM, but applying the function to the individual list items in parallel.

  3. mapM :: Monad m => (b -> m c) -> Fold m a b -> Fold m a c

    streamly-core Streamly.Data.Fold

    Deprecated: Use rmapM instead

  4. mapM :: Monad m => (a -> m b) -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    >>> mapM f = Stream.sequence . fmap f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> s = Stream.fromList ["a", "b", "c"]
    
    >>> Stream.fold Fold.drain $ Stream.mapM putStr s
    abc
    

  5. mapM :: Monad m => (a -> m b) -> StreamK m a -> StreamK m b

    streamly-core Streamly.Data.StreamK

    No documentation available.

  6. mapM :: Monad m => (b -> m c) -> Unfold m a b -> Unfold m a c

    streamly-core Streamly.Data.Unfold

    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.

    >>> mapM f = Unfold.mapM2 (const f)
    

  7. mapM :: Monad m => (b -> m c) -> Fold m a b -> Fold m a c

    streamly-core Streamly.Internal.Data.Fold

    Deprecated: Use rmapM instead

  8. mapM :: Monad m => (a -> m b) -> Pipe m a b

    streamly-core Streamly.Internal.Data.Pipe

    Lift a monadic function to a Pipe.

  9. mapM :: Monad m => (a -> m b) -> Stream m a -> Stream m b

    streamly-core Streamly.Internal.Data.Stream

    >>> mapM f = Stream.sequence . fmap f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> s = Stream.fromList ["a", "b", "c"]
    
    >>> Stream.fold Fold.drain $ Stream.mapM putStr s
    abc
    

  10. mapM :: Monad m => (a -> m b) -> Stream m a -> Stream m b

    streamly-core Streamly.Internal.Data.Stream

    >>> mapM f = Stream.sequence . fmap f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> s = Stream.fromList ["a", "b", "c"]
    
    >>> Stream.fold Fold.drain $ Stream.mapM putStr s
    abc
    

Page 8 of many | Previous | Next