Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does [2, 2) make sense?


It’s the empty interval. It’s the set of numbers x for which x >= 2 and x < 2, which is none, and hence the empty set. It’s the equivalent of this for loop (for integers):

  for (int i = 2; i < 2; ++i) { … }
The body of the loop will be executed zero times.




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

Search: