Hacker News new | past | comments | ask | show | jobs | submit login

Is that consistent with the first condition in the function? This function accepts fromIndex == arrayLen if toIndex == arrayLen. Of course, there may be a precondition that rules it out, or it might be an acceptable postcondition.



Under the scheme described, fromIndex == toIndex would be a stretch of 0 array elements, so it wouldn't really matter whether fromIndex and toIndex pointed into the array at all.


Doh! - thanks.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: