fromPredicateK<C, L, R> function

ReaderTaskEither<C, L, R> Function(R r) fromPredicateK<C, L, R>(
  1. bool f(
    1. R r
    ),
  2. L orElse(
    1. R r
    )
)

If the function returns true, then the resolved Either will be a Right containing the given value.

If the function returns false, then the resolved Either will be a Left containing the value returned from executing the orElse function.

Implementation

ReaderTaskEither<C, L, R> Function(R r) fromPredicateK<C, L, R>(
  bool Function(R r) f,
  L Function(R r) orElse,
) =>
    (r) => fromPredicate(r, f, orElse);