Search results
for_ :: forall a b f m. Applicative m => Foldable f => f a -> (a -> m b) -> m Unit
A version of traverse_ with its arguments flipped.
This can be useful when running an action written using do notation for every element in a data structure:
For example:
for_ [1, 2, 3] \n -> do
print n
trace "squared is"
print (n * n)
for_ :: forall f m a. Foldable f => MonadRec m => f a -> (a -> m Unit) -> m Unit
Safely traverse a foldable container.
No further results.