I'm upgrading from 0.11 to 0.13. Is there an updat...
# arrow
d
I'm upgrading from 0.11 to 0.13. Is there an updated document on traverse?
I was previously relying on
Copy code
import arrow.core.extensions.either.applicative.applicative
import arrow.core.extensions.list.traverse.traverse
s
Hey @Daniel Berg, The release post will follow in the coming days. You can already find the binaries etc but it's not officially announced yet. With that release there will be more detail about this. However, to help you out already I can see you're using
traverse
on
List
for
Either
. Now you can simply call.
traverseEither
on
Iterable<A>
. There is no longer a need to pass around
Applicative
or to call
fix
. You can find it under
arrow.core.traverseEither
Copy code
import arrow.core.traverseEither
import arrow.core.left
import arrow.core.right

listOf(2, 4, 6).traverseEither { i ->
  if(i % 2 == 0) i.right() else i.left()
} // Right(List(2, 3, 4))
d
Oh nice! Thanks @simon.vergauwen!
👍 1
s
You're very welcome @Daniel Berg!