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

Function intersectionWith

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

Source from the content-addressed store, hash-verified

3193 that: T
3194 ): <S extends Iterable<any>>(
3195 self: S
3196 ) => ReadonlyArray.OrNonEmpty<S, T, ReadonlyArray.Infer<S> | ReadonlyArray.Infer<T>>
3197 <A, B>(self: NonEmptyReadonlyArray<A>, that: ReadonlyArray<B>): NonEmptyArray<A | B>
3198 <A, B>(self: ReadonlyArray<A>, that: NonEmptyReadonlyArray<B>): NonEmptyArray<A | B>
3199 <A, B>(self: Iterable<A>, that: Iterable<B>): Array<A | B>
3200} = dual(
3201 2,
3202 <A, B>(self: Iterable<A>, that: Iterable<B>): Array<A | B> => {
3203 const a = fromIterable(self)
3204 const b = fromIterable(that)
3205 if (isReadonlyArrayNonEmpty(a)) {
3206 return isReadonlyArrayNonEmpty(b) ? dedupe(appendAll(a, b)) : a
3207 }
3208 return b
3209 }
3210)

Callers 2

Array.test.tsFile · 0.85
Array.tsFile · 0.85

Calls 4

filterMethod · 0.80
containsWithFunction · 0.70
fromIterableFunction · 0.70
hasFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…