fromPredicate
fromPredicate<
E,A>(pred,onFalse): (a) =>Validation<E,A>
Defined in: Core/Validation.ts:91
Creates a Validation from a predicate applied to a value.
Returns Passed if the predicate passes, Failed from onFalse otherwise.
Type Parameters
Section titled “Type Parameters”E
A
Parameters
Section titled “Parameters”(a) => boolean
onFalse
Section titled “onFalse”(a) => E
Returns
Section titled “Returns”(a) => Validation<E, A>