filter<S, C, L, R> function
StateReaderTaskEither<S, C, L, R> Function(StateReaderTaskEither<S, C, L, R> )
filter<S, C, L, R>(
- bool predicate(
- R value
- L orElse(
- 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),
)));