(...iters)
| 132 | } |
| 133 | |
| 134 | subtract(...iters) { |
| 135 | if (iters.length === 0) { |
| 136 | return this; |
| 137 | } |
| 138 | iters = iters.map((iter) => SetCollection(iter)); |
| 139 | const toRemove = []; |
| 140 | this.forEach((value) => { |
| 141 | if (iters.some((iter) => iter.includes(value))) { |
| 142 | toRemove.push(value); |
| 143 | } |
| 144 | }); |
| 145 | return this.withMutations((set) => { |
| 146 | toRemove.forEach((value) => { |
| 147 | set.remove(value); |
| 148 | }); |
| 149 | }); |
| 150 | } |
| 151 | |
| 152 | sort(comparator) { |
| 153 | // Late binding |
nothing calls this directly
no test coverage detected