filter<C, L, R> function

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

Conditionally filter the ReaderTaskEither, transforming Right values to Left.

Implementation

ReaderTaskEither<C, L, R> Function(
  ReaderTaskEither<C, L, R> taskEither,
) filter<C, L, R>(
  bool Function(R value) predicate,
  L Function(R value) orElse,
) =>
    (fa) => ReaderTaskEither((r) => fa(r).p(TE.filter(predicate, orElse)));