either property

RIO<R, Either<E, A>> either

Squashes the error and success channels into a single Either result.

Implementation

RIO<R, Either<E, A>> get either => ZIO.from((ctx) => unsafeRun(ctx).then(
      (exit) => exit.matchExit(
        (_) => Either.right(Either.left(_)),
        (_) => Either.right(Either.right(_)),
      ),
    ));