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

Function every

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

Source from the content-addressed store, hash-verified

1899 * @since 2.0.0
1900 */
1901export function every<A>(collection: Iterable<Predicate<A>>): Predicate<A> {
1902 return (a) => {
1903 for (const p of collection) {
1904 if (!p(a)) {
1905 return false
1906 }
1907 }
1908 return true
1909 }
1910}
1911
1912/**
1913 * 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