File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4416,11 +4416,12 @@ see why consumers matter.
4416
4416
4417
4417
## Iterators
4418
4418
4419
- As we've said before, an iterator is something that we can call the ` .next() `
4420
- method on repeatedly, and it gives us a sequence of things. Because you need
4421
- 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
4422
- example, does not actually generate the numbers ` 1-100 ` , and just creates a
4423
- value that represents the sequence:
4419
+ As we've said before, an iterator is something that we can call the
4420
+ ` .next() ` method on repeatedly, and it gives us a sequence of things.
4421
+ Because you need to call the method, this means that iterators
4422
+ are ** lazy** and don't need to generate all of the values upfront.
4423
+ This code, for example, does not actually generate the numbers
4424
+ ` 1-100 ` , and just creates a value that represents the sequence:
4424
4425
4425
4426
``` {rust}
4426
4427
let nums = range(1i, 100i);
You can’t perform that action at this time.
0 commit comments