ZIO<R, E, A>.syncEither constructor

ZIO<R, E, A>.syncEither(
  1. Either<E, A> f()
)

Create a EIO from the resulting Either, succeeding when it is a Right, and failing with the Left value when it is a Left.

Implementation

factory ZIO.syncEither(Either<E, A> Function() f) =>
    ZIO.from((ctx) => f().toExit());