match<C> method
{@category folding}
Implementation
Effect<E, Never, C> match<C>({
required C Function(L l) onFailure,
required C Function(R r) onSuccess,
}) =>
Effect.from(
(context) => _unsafeRun(context).then(
(exit) => switch (exit) {
Left(value: final cause) => switch (cause) {
Failure<L>(error: final error) => Right(onFailure(error)),
Die() => Left(cause),
Interrupted() => Left(cause),
},
Right(value: final value) => Right(onSuccess(value)),
},
),
);