alt<S, C, L, R> function

StateReaderTaskEither<S, C, L, R> Function(StateReaderTaskEither<S, C, L, R>) alt<S, C, L, R>(
  1. StateReaderTaskEither<S, C, L, R> orElse(
    1. L left
    )
)

If the given StateReaderTaskEither is an Left, then unwrap the result and transform it into an alternative StateReaderTaskEither.

Implementation

StateReaderTaskEither<S, C, L, R> Function(
    StateReaderTaskEither<S, C, L, R>) alt<S, C, L, R>(
  StateReaderTaskEither<S, C, L, R> Function(L left) orElse,
) =>
    (f) =>
        StateReaderTaskEither((s) => f(s).chain(RTE.alt((l) => orElse(l)(s))));