(array, val1, mode, memo, comparator, start, end)
| 669 | } |
| 670 | |
| 671 | function arrayHasEqualElement(array, val1, mode, memo, comparator, start, end) { |
| 672 | for (let i = end - 1; i >= start; i--) { |
| 673 | if (comparator(val1, array[i], mode, memo)) { |
| 674 | // Move the matching element to make sure we do not check that again. |
| 675 | array[i] = array[end]; |
| 676 | return true; |
| 677 | } |
| 678 | } |
| 679 | return false; |
| 680 | } |
| 681 | |
| 682 | function setObjectEquiv(array, a, b, mode, memo) { |
| 683 | let direction = 1; |
no test coverage detected
searching dependent graphs…