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

Function differenceWith

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

Source from the content-addressed store, hash-verified

3261 * values present in both inputs while preserving the first input's order.
3262 *
3263 * **Example** (Computing array intersections)
3264 *
3265 * ```ts import.meta.vitest
3266 * import { Array } from "effect"
3267 *
3268 * Array.intersection([1, 2, 3], [3, 4, 1]) // => [1, 3]
3269 * ```
3270 *
3271 * @see {@link intersectionWith} — use custom equality
3272 * @see {@link union} — elements in either array
3273 * @see {@link difference} — elements only in the first array
3274 *
3275 * @category set operations
3276 * @since 2.0.0
3277 */
3278export const intersection: {

Callers 3

Array.tsFile · 0.70
Chunk.test.tsFile · 0.50
Array.test.tsFile · 0.50

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…