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

Function elem_

packages/effect-app/src/Set.ts:318–328  ·  view source on GitHub ↗
(E: Equivalence.Equivalence<A>)

Source from the content-addressed store, hash-verified

316 * Test if a value is a member of a set
317 */
318export function elem_<A>(E: Equivalence.Equivalence<A>): (set: Set<A>, a: A) => boolean {
319 return (set, a) => {
320 const values = set.values()
321 let e: Next<A>
322 let found = false
323 while (!found && !(e = values.next() as any).done) {
324 found = E(a, e.value)
325 }
326 return found
327 }
328}
329
330/**
331 * Test if a value is a member of a set

Callers 13

intersection_Function · 0.85
map_Function · 0.85
chain_Function · 0.85
isSubset_Function · 0.85
elemFunction · 0.85
partitionMap_Function · 0.85
difference_Function · 0.85
insert_Function · 0.85
toggle_Function · 0.85
fromArrayFunction · 0.85
separateFunction · 0.85
filterMap_Function · 0.85

Calls 2

nextMethod · 0.65
EClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…