Merge pull request #553 from shepmaster/no-inclusive-range

Inclusive ranges are not stable, don't tell people to use them
This commit is contained in:
Carol (Nichols || Goulding)
2017-03-22 13:49:44 -04:00
committed by GitHub

View File

@@ -14,10 +14,9 @@ Now that you know more Rust, we can talk in detail about how this works.
Ranges (the `0..10`) are 'iterators'. An iterator is something that we can
call the `.next()` method on repeatedly, and it gives us a sequence of things.
(By the way, a range with two dots like `0..10` is inclusive on the left (so it
A range with two dots like `0..10` is inclusive on the left (so it
starts at 0) and exclusive on the right (so it ends at 9). A mathematician
would write "[0, 10)". To get a range that goes all the way up to 10 you can
write `0...10`.)
would write "[0, 10)".
Like this: