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.
-
vector-sized Data.Vector.Generic.Sized O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
-
vector-sized Data.Vector.Primitive.Sized O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
mapM :: forall m a b (n :: Nat) . Monad m => (a -> m b) -> Vector n a -> m (Vector n b)vector-sized Data.Vector.Sized O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
-
vector-sized Data.Vector.Storable.Sized O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
-
vector-sized Data.Vector.Unboxed.Sized O(n) Apply the monadic action to all elements of the vector, yielding a vector of results.
mapM :: forall m a b (n :: Nat) . Monad m => (a -> m b) -> ListN n a -> m (ListN n b)basement Basement.Sized.List Map each element of a List to a monadic action, evaluate these actions sequentially and collect the results
-
massiv Data.Massiv.Array Map a monadic action over an array sequentially.
mapM :: Monad m => (a -> m b) -> [a] -> m [b]ghc-internal GHC.Internal.Base mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)ghc-internal GHC.Internal.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)ghc-internal GHC.Internal.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.