hi - is there a `foreach` equivalent for `Either` ...
# arrow
p
hi - is there a
foreach
equivalent for
Either
in arrow?
p
yes, it's
traverse
. Apply one effect to each element of a collection.
👍 1
It collects to something like an
IO
or an `Eval`that you'll need to exeute later
oh wait
for Either
yeah, fold
Copy code
either.fold({
  IO { oneEffect() } 
}, { 
  IO { otherEffect() } 
})