forM_

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 element or form attribute
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_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
Synonym for oforM_
forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore its results, see forM.
Like forM_, but applying the function to the individual list items in parallel.
Constrained to Container version of forM_.
>>> forM_ [True, False] print
True
False
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
O(n) Apply the monadic action to all elements of a vector and ignore the results. Equivalent to flip mapM_.
Just like mapM_, except with flipped arguments.

Examples

Here is a common way of iterating N times using a for loop in an imperative language with mutation being an obvious side effect:
>>> import Data.Massiv.Array as A

>>> import Data.IORef

>>> ref <- newIORef 0 :: IO (IORef Int)

>>> A.forM_ (range Seq (Ix1 0) 1000) $ \ i -> modifyIORef' ref (+i)

>>> readIORef ref
499500
forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.
Same as mapM_ with arguments flipped
Convenience function as found in Data.Foldable and Control.Monad
flip mapM_