:: (Applicative m, Foldable f, Monoid b) => (a -> m b) -> f a -> m b package:Agda

Generalized version of traverse_ :: Applicative m => (a -> m ()) -> [a] -> m () Executes effects and collects results in left-to-right order. Works best with left-associative monoids. Note that there is an alternative
mapM' f t = foldr mappend mempty $ mapM f t
that collects results in right-to-left order (effects still left-to-right). It might be preferable for right associative monoids.
Generalized version of for_ :: Applicative m => [a] -> (a -> m ()) -> m ()