MCPcopy Index your code
hub / github.com/Effect-TS/effect / containsWith

Function containsWith

packages/effect/src/Array.ts:1826–1837  ·  view source on GitHub ↗
(isEquivalent: (self: A, that: A) => boolean)

Source from the content-addressed store, hash-verified

1824 * @since 2.0.0
1825 */
1826export const containsWith = <A>(isEquivalent: (self: A, that: A) => boolean): {
1827 (a: A): (self: Iterable<A>) => boolean
1828 (self: Iterable<A>, a: A): boolean
1829} =>
1830 dual(2, (self: Iterable<A>, a: A): boolean => {
1831 for (const i of self) {
1832 if (isEquivalent(a, i)) {
1833 return true
1834 }
1835 }
1836 return false
1837 })
1838
1839const _equivalence = Equal.equivalence()
1840

Callers 4

Array.tsFile · 0.70
intersectionWithFunction · 0.70
differenceWithFunction · 0.70
Option.test.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…