:: Monad m => [a] -> (a -> m ()) -> m () -package:base-compat

This has a more specific type (unit result) than normally, to catch errors.
Generalized version of forConcurrently_.
Generalized version of forConcurrently_.
forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM. forM_ is just like for_, but specialised to monadic actions.
forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM. As of base 4.8.0.0, forM_ is just for_, specialized to Monad.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
Like forM_, but applying the function to the individual list items in parallel.
for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for. This is forM_ generalised to Applicative actions. for_ is just like forM_, but generalised to Applicative actions.

Examples

Basic usage:
>>> for_ [1..4] print
1
2
3
4
for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for.
>>> for_ [1..4] print
1
2
3
4
Generalized version of for_ :: Applicative m => [a] -> (a -> m ()) -> m ()
A version of mconcatMap that works with a monadic predicate.
Maps a splice generating function over a list and concatenates the results. This function now has a more general type signature so it works with both compiled and interpreted splices. The old type signature was this:
mapSplices :: (Monad n)
=> (a -> Splice n n)
-> [a]
-> Splice n n
This has a more specific type (unit result) than normally, to catch errors.
Generalized version of mapConcurrently_.
Generalized version of mapConcurrently_.
Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.
Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. As of base 4.8.0.0, mapM_ is just traverse_, specialized to Monad.
O(n) Apply the monadic action to all elements of a vector and ignore the results.
O(n) Apply the monadic action to all elements of a vector and ignore the results
Polymorphic version of the concatMapM function.
>>> foldMapM @[Int] (Just . replicate 3) [1..3]
Just [1,1,1,2,2,2,3,3,3]
Extend foldMap to allow side effects. Internally, this is implemented using a strict left fold. This is used for performance reasons. It also necessitates that this function has a Monad constraint and not just an Applicative constraint. For more information, see https://github.com/commercialhaskell/rio/pull/99#issuecomment-394179757.
This is generally a faster way to traverse while ignoring the result rather than using mapM_.