fromPredicate()
fromPredicate<
A,E>(predicate,onFalse): (a) =>TaskEither<E,A>
Creates a TaskEither from a predicate.
Type Parameters
A: A
The value type.
E: E
The error type.
Parameters
predicate: (a) => boolean
The predicate function.
onFalse: (a) => E
Function to create error when predicate fails.
Returns
A function that creates a TaskEither.
Since
2.0.0