UNPKG

@effect-ts/system

Version:

Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.

6 lines 258 B
import * as core from "./core.mjs"; import * as fail from "./fail.mjs"; export function fromPredicate(predicate, onFalse) { return a => core.suspend(() => predicate(a) ? core.succeed(a) : fail.fail(onFalse(a))); } //# sourceMappingURL=fromPredicate.mjs.map