fromPredicateK<S, C, L, R> function

StateReaderTaskEither<S, C, L, R> Function(R r) fromPredicateK<S, 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

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