Hoogle Search
Within LTS Haskell 22.21 (ghc-9.6.5)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)base 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.mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)base Control.Monad 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.mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)base Data.Traversable 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.mapM :: Monad m => (a -> m b) -> [a] -> m [b]base GHC.Base mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b)vector Data.Vector O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
mapM :: Monad m => (a -> m b) -> Bundle v a -> Bundle m v bvector Data.Vector.Fusion.Bundle Apply a monadic action to each element of the stream, producing a monadic stream of results
mapM :: Monad m => (a -> m b) -> Bundle m v a -> Bundle m v bvector Data.Vector.Fusion.Bundle.Monadic Map a monadic function over a Bundle
mapM :: (Monad m, Vector v a, Vector v b) => (a -> m b) -> v a -> m (v b)vector Data.Vector.Generic O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
mapM :: (Monad m, Prim a, Prim b) => (a -> m b) -> Vector a -> m (Vector b)vector Data.Vector.Primitive O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
mapM :: (Monad m, Storable a, Storable b) => (a -> m b) -> Vector a -> m (Vector b)vector Data.Vector.Storable O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
Page 1 of many | Next