Package: effect
Module: Predicate
Creates a predicate that returns true if all predicates in the collection return true.
When to use
Use when you have a dynamic list of predicates to apply.
Details
Evaluation short-circuits on the first false. The collection is iterated
each time the predicate is called.
Example (Checking all predicates)
import { Predicate } from "effect"
const allChecks = Predicate.every([Predicate.isNumber, (n: number) => n > 0])
console.log(allChecks(2))
See
someandSignature
declare const every: <A>(collection: Iterable<Predicate<A>>) => Predicate<A>
Since v2.0.0