orElse<TL> method
When this ReaderTaskEither returns a Left then return the result of orElse
.
Otherwise return this ReaderTaskEither.
Implementation
ReaderTaskEither<E, TL, R> orElse<TL>(
ReaderTaskEither<E, TL, R> Function(L l) orElse,
) =>
ReaderTaskEither((env) async => (await run(env)).match(
(l) => orElse(l).run(env),
(r) => ReaderTaskEither<E, TL, R>.of(r).run(env),
));