match<E2, B> method
Reduce the success and error values of this ZIO using the given functions.
Implementation
ZIO<R, E2, B> match<E2, B>(
ZIO<R, E2, B> Function(E _) onError,
ZIO<R, E2, B> Function(A _) onSuccess,
) =>
ZIO.from(
(ctx) => unsafeRun(ctx).then(
(ea) => ea._matchExitFOr(
(e) => onError(e).unsafeRun(ctx),
(a) => onSuccess(a).unsafeRun(ctx),
),
),
);