There appears to be an issue with Either.LeftProjection.traverseIO. Current implementation is:
public <C> IO<Either<C, B>> traverseIO(final F<A, IO<C>> f) {
return e.isRight() ?
IOFunctions.map(f.f(value()), Either::<C, B>left) :
IOFunctions.unit(Either.right(e.right().value()));
}
The issue appears to be in the conditional. Instead of checking if its a left & applying the function, it checks if its a right. Doing the following appears to fix this.
public <C> IO<Either<C, B>> traverseIO(final F<A, IO<C>> f) {
return e.isLeft() ?
IOFunctions.map(f.f(value()), Either::<C, B>left) :
IOFunctions.unit(Either.right(e.right().value()));
}
There appears to be an issue with
Either.LeftProjection.traverseIO. Current implementation is:The issue appears to be in the conditional. Instead of checking if its a left & applying the function, it checks if its a right. Doing the following appears to fix this.