Skip to content

Commit

Permalink
Merge pull request #553 from shepmaster/no-inclusive-range
Browse files Browse the repository at this point in the history
Inclusive ranges are not stable, don't tell people to use them
  • Loading branch information
carols10cents authored Mar 22, 2017
2 parents ecc3adf + 27602e4 commit fa2e43f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions first-edition/src/iterators.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit fa2e43f

Please sign in to comment.