(isEquivalent: (self: A, that: A) => boolean)
| 2397 | * @since 2.0.0 |
| 2398 | */ |
| 2399 | export const differenceWith = <A>(isEquivalent: (self: A, that: A) => boolean): { |
| 2400 | (that: Iterable<A>): (self: Iterable<A>) => Array<A> |
| 2401 | (self: Iterable<A>, that: Iterable<A>): Array<A> |
| 2402 | } => { |
| 2403 | const has = containsWith(isEquivalent) |
| 2404 | return dual( |
| 2405 | 2, |
| 2406 | (self: Iterable<A>, that: Iterable<A>): Array<A> => { |
| 2407 | const bs = fromIterable(that) |
| 2408 | return fromIterable(self).filter((a) => !has(bs, a)) |
| 2409 | } |
| 2410 | ) |
| 2411 | } |
| 2412 | |
| 2413 | /** |
| 2414 | * Creates a `Array` of values not included in the other given `Iterable`. |
no test coverage detected
searching dependent graphs…