traverse_

Map each element of a structure to an Applicative action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse. traverse_ is just like mapM_, but generalised to Applicative actions.

Examples

Basic usage:
>>> traverse_ print ["Hello", "world", "!"]
"Hello"
"world"
"!"
Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse.
Synonym for otraverse_
Visit every node in the given list. If new nodes are appended during the traversal, they will not be visited. Every live node that was in the list when the traversal began will be visited exactly once; however, no guarantee is made about the order of the traversal.
Visit every node in the given list. If new nodes are appended during the traversal, they will not be visited. Every live node that was in the list when the traversal began will be visited exactly once; however, no guarantee is made about the order of the traversal.
Execute, traversing the stream with a side effect in the inner monad.
Map each element of the array to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results, see traverse.
Constrained to Container version of traverse_.
>>> traverse_ putTextLn ["foo", "bar"]
foo
bar
Map each element of a collection to an action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see traverse
Map each element to an action, evaluate these actions from left to right and ignore the results. Note that the return type is Void instead of usual ().
>>> traverse_ print (0...) -- hit Ctrl+C to terminate
0
1
2Interrupted
traverse_ could be productive for some short-circuiting f:
>>> traverse_ (\x -> if x > 10 then Left x else Right ()) (0...)
Left 11
Efficiently mapReduce a Generator using the Traversal monoid. A specialized version of its namesake from Data.Foldable
mapReduce getTraversal
Despite the ridiculous-looking signature, this is in fact equivalent to traverse_ within Hask.
This is generally a faster way to traverse while ignoring the result rather than using mapM_.
Specialization of htraverse_.
Specialization of htraverse_.
Specialization of htraverse_. Note: we don't need Applicative constraint.
Specialization of htraverse_.