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

Function elem

packages/effect-app/src/Chunk.ts:60–69  ·  view source on GitHub ↗
(E: Equivalence<A>, value: A)

Source from the content-addressed store, hash-verified

58 * in an array of type `Chunk<A>`.
59 */
60export function elem<A>(E: Equivalence<A>, value: A) {
61 return (self: Chunk.Chunk<A>): boolean => {
62 for (let i = 0; i < self.length; i++) {
63 if (E(Chunk.getUnsafe(self, i), value)) {
64 return true
65 }
66 }
67 return false
68 }
69}
70
71export const ChunkPartition = Chunk.partition
72

Callers 1

uniqFunction · 0.70

Calls 2

getUnsafeMethod · 0.80
EClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…