Skip to main content
Module

x/hkts/either.ts>fromPredicate

Functional programming tools: option, either, task, state, optics, etc.
Latest
variable fromPredicate
import { fromPredicate } from "https://deno.land/x/hkts@v0.0.52/either.ts";

type

{ <E, A, B extends A>(refinement: Refinement<A, B>, onFalse: (a: A) => E): (a: A) => Either<E, B>; <E, A>(predicate: Predicate<A>, onFalse: (a: A) => E): (a: A) => Either<E, A>; }