From 1bfe6a2a54e47679b4aed2a745dbd70bb393121a Mon Sep 17 00:00:00 2001 From: Piotr Szotkowski Date: Tue, 28 Oct 2014 20:23:59 +0100 Subject: Guide: Iterators: …are always lazy + rewrap as per request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/doc/guide.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 34ec7e4eee9..a1cb07092b2 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -4416,11 +4416,12 @@ see why consumers matter. ## Iterators -As we've said before, an iterator is something that we can call the `.next()` -method on repeatedly, and it gives us a sequence of things. Because you need -to call the method, this means that iterators can be **lazy** and don't need to generate all of the values upfront. This code, for -example, does not actually generate the numbers `1-100`, and just creates a -value that represents the sequence: +As we've said before, an iterator is something that we can call the +`.next()` method on repeatedly, and it gives us a sequence of things. +Because you need to call the method, this means that iterators +are **lazy** and don't need to generate all of the values upfront. +This code, for example, does not actually generate the numbers +`1-100`, and just creates a value that represents the sequence: ```{rust} let nums = range(1i, 100i); -- cgit 1.4.1-3-g733a5