MCPcopy Create free account
hub / github.com/effect-app/libs / some

Function some

packages/effect-app/src/Set.ts:134–144  ·  view source on GitHub ↗
(predicate: Predicate<A>)

Source from the content-addressed store, hash-verified

132 * true if one or more elements match predicate
133 */
134export function some<A>(predicate: Predicate<A>): (set: Set<A>) => boolean {
135 return (set) => {
136 const values = set.values()
137 let e: Next<A>
138 let found = false
139 while (!found && !(e = values.next() as any).done) {
140 found = predicate(e.value)
141 }
142 return found
143 }
144}
145
146/**
147 * true if one or more elements match predicate

Callers 2

some_Function · 0.70
every_Function · 0.70

Calls 2

predicateFunction · 0.85
nextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…