MCPcopy Create free account
hub / github.com/Effect-TS/effect / every

Function every

packages/effect/src/Predicate.ts:1836–1845  ·  view source on GitHub ↗
(collection: Iterable<Predicate<A>>)

Source from the content-addressed store, hash-verified

1834 * @since 2.0.0
1835 */
1836export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
1837 return (a) => {
1838 for (const p of collection) {
1839 if (!p(a)) {
1840 return false
1841 }
1842 }
1843 return true
1844 }
1845}
1846
1847/**
1848 * Creates a predicate that returns `true` if any predicate in the collection returns `true`.

Callers

nothing calls this directly

Calls 1

pFunction · 0.85

Tested by

no test coverage detected