Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. mapM :: (IsStream t, MonadAsync m) => (a -> m b) -> t m a -> t m b

    streamly Streamly.Internal.Data.Stream.IsStream

    mapM f = sequence . map f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> drain $ Stream.mapM putStr $ Stream.fromList ["a", "b", "c"]
    abc
    
    >>> :{
    drain $ Stream.replicateM 10 (return 1)
    & (fromSerial . Stream.mapM (x -> threadDelay 1000000 >> print x))
    :}
    1
    ...
    1
    
    > drain $ Stream.replicateM 10 (return 1)
    & (fromAsync . Stream.mapM (x -> threadDelay 1000000 >> print x))
    
    Concurrent (do not use with fromParallel on infinite streams)

  2. mapM :: Monad m => (a -> m b) -> SerialT m a -> SerialT m b

    streamly Streamly.Internal.Data.Stream.Serial

    No documentation available.

  3. mapM :: (IsStream t, MonadAsync m) => (a -> m b) -> t m a -> t m b

    streamly Streamly.Prelude

    mapM f = sequence . map f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> drain $ Stream.mapM putStr $ Stream.fromList ["a", "b", "c"]
    abc
    
    >>> :{
    drain $ Stream.replicateM 10 (return 1)
    & (fromSerial . Stream.mapM (x -> threadDelay 1000000 >> print x))
    :}
    1
    ...
    1
    
    > drain $ Stream.replicateM 10 (return 1)
    & (fromAsync . Stream.mapM (x -> threadDelay 1000000 >> print x))
    
    Concurrent (do not use with fromParallel on infinite streams)

  4. mapM :: (Monad m, Unboxable a, Unboxable b) => (a -> m b) -> Vector a -> m (Vector b)

    unboxing-vector Data.Vector.Unboxing

    No documentation available.

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

    classy-prelude-yesod ClassyPrelude.Yesod

    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.

  6. mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), TraversalObject k t b) => k a (m b) -> k (t a) (m (t b))

    constrained-categories Control.Category.Constrained.Prelude

    traverse, restricted to endofunctors. May be more efficient to implement.

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

    constrained-categories Control.Category.Hask

    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.

  8. mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), TraversalObject k t b) => k a (m b) -> k (t a) (m (t b))

    constrained-categories Control.Monad.Constrained

    traverse, restricted to endofunctors. May be more efficient to implement.

  9. mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), TraversalObject k t b) => k a (m b) -> k (t a) (m (t b))

    constrained-categories Data.Traversable.Constrained

    traverse, restricted to endofunctors. May be more efficient to implement.

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

    copilot-language Copilot.Language.Prelude

    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.

Page 10 of many | Previous | Next