Everybody else has covered everything I wanted to say.
BUT they all missed the error. Boo ha ha. After the first iteration this
return end;
is unlikely to be the actual
end
iterator (it is the end of the current range which has been subdivided many times). eg: finding
2
in
[1, 3, 4, 5]
will return the iterator for
3
. —
Loki Astari yesterday