alt method
When this ReaderTaskEither returns Right, then return the current ReaderTaskEither.
Otherwise return the result of orElse
.
Used to provide an alternative ReaderTaskEither in case the current one returns Left.
Implementation
@override
ReaderTaskEither<E, L, R> alt(
covariant ReaderTaskEither<E, L, R> Function() orElse,
) =>
ReaderTaskEither(
(env) async => (await run(env)).match(
(_) => orElse().run(env),
right,
),
);