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

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_.
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
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
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.