(isEquivalent: (self: A, that: A) => boolean)
| 2536 | */ |
| 2537 | export const containsWith = <A>(isEquivalent: (self: A, that: A) => boolean): { |
| 2538 | (a: A): (self: Iterable<A>) => boolean |
| 2539 | (self: Iterable<A>, a: A): boolean |
| 2540 | } => |
| 2541 | dual(2, (self: Iterable<A>, a: A): boolean => { |
| 2542 | for (const i of self) { |
| 2543 | if (isEquivalent(a, i)) { |
| 2544 | return true |
| 2545 | } |
| 2546 | } |
| 2547 | return false |
| 2548 | }) |
| 2549 | |
| 2550 | /** |
| 2551 | * Checks whether an array contains a value, using `Equal.equivalence()` for |
| 2552 | * comparison. |
no outgoing calls
no test coverage detected
searching dependent graphs…