for_

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
The for attribute.
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
Synonym for ofor_
for_ is traverse_ with its arguments flipped. For a version that doesn't ignore the results see for.
>>> for_ (C.fromList [1..4] :: PrimArray Int) print
1
2
3
4
Constrained to Container version of for_.
>>> for_ [1 .. 5 :: Int] $ \i -> when (even i) (print i)
2
4
Flipped traverse_.
The for attribute.
Convenience function as found in Data.Foldable
flip traverse_
As bitraverse_, but with the structure as the primary argument. For a version that doesn't ignore the results, see bifor.

Examples

Basic usage:
>>> bifor_ ("Hello", True) print (print . show)
"Hello"
"True"
>>> bifor_ (Right True) print (print . show)
"True"
>>> bifor_ (Left "Hello") print (print . show)
"Hello"
Traverse elements with access to the index i, discarding the results (with the arguments flipped).
ifor_flip itraverse_
When you don't need access to the index then for_ is more flexible in what it accepts.
for_ a ≡ ifor_ a . const
As bitraverse_, but with the structure as the primary argument. For a version that doesn't ignore the results, see bifor.
>>> > bifor_ ('a', "bc") print (print . reverse)
'a'
"cb"
ofor_ is otraverse_ with its arguments flipped.
Flipped version of hctraverse_.
btraverse_ with the arguments flipped.
ttraverse_ with the arguments flipped.