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

Function containsWith

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

Source from the content-addressed store, hash-verified

527 * @since 2.0.0
528 */
529export const containsWith = <A>(isEquivalent: (self: A, that: A) => boolean): {
530 (a: A): (self: Iterable<A>) => boolean
531 (self: Iterable<A>, a: A): boolean
532} =>
533 dual(2, (self: Iterable<A>, a: A): boolean => {
534 for (const i of self) {
535 if (isEquivalent(a, i)) {
536 return true
537 }
538 }
539 return false
540 })
541
542const _equivalence = Equal.equivalence()
543

Callers 1

Iterable.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected