I haven't kept up to date. what is the recommended...
# arrow
s
I haven't kept up to date. what is the recommended way of doing a two response left error (non throwable), right result and using fx/comprehensions?
s
from what I know, today option would be IO<Either<Left, Right>>. In 2020, arrow is coming with BIO, with that above should be possible.
👍🏼 2
s
Thanks what I was thinking, I must be doing something wrong I was getting a restricted scope when trying to nest the Either.fx
p
you can only call IO functions in the IO.fx scope, and same for Either.fx, you cannot mix and match them for use cases like
bind()
I’d suggest making an extension like
Copy code
fun ConcurrentSyntax<ForIO>.bindEither(ioEither: IO<Either<Throwable, A>>) =
  ioEither.bind().toIO().bind()
bindEither(myIOEither)
that should work
s
Thanks I'll give it a try
p
couple of tweaks, I missed something