filter<S, C, L, R> function

StateReaderTaskEither<S, C, L, R> Function(StateReaderTaskEither<S, C, L, R>) filter<S, C, L, R>(
  1. bool predicate(
    1. R value
    ),
  2. L orElse(
    1. R value
    )
)

Conditionally filter the StateReaderTaskEither, transforming Right values to Left.

Implementation

StateReaderTaskEither<S, C, L, R> Function(StateReaderTaskEither<S, C, L, R>)
    filter<S, C, L, R>(
  bool Function(R value) predicate,
  L Function(R value) orElse,
) =>
        (f) => StateReaderTaskEither(f.call.compose(RTE.filter(
              (t) => predicate(t.first),
              (t) => orElse(t.first),
            )));