mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-06-16 05:24:17 -06:00
finished 13.3
This commit is contained in:
parent
ba2884744b
commit
d961dd4ee9
@ -201,4 +201,12 @@ The original implementation of minigrep verses using iterators.
|
|||||||
|
|
||||||
Most Rust programmers prefer to use the iterator style.
|
Most Rust programmers prefer to use the iterator style.
|
||||||
|
|
||||||
It is a bit tougher to get the hand of at first, once you get the feel for the various
|
It is a bit tougher to get the hand of at first, once you get the feel for the various iterator adaptor and what they do.
|
||||||
|
|
||||||
|
Iterators can be easier to understand.
|
||||||
|
|
||||||
|
Instead of fiddling with various bits of looping and building new vectors, the code focuses on high-level objective of the loop.
|
||||||
|
|
||||||
|
This abraction takes away some of the commonplace code so it is easier to see the concepts that are unique to this code, such as the filtering condition each element in the iteraor must pass.
|
||||||
|
|
||||||
|
You may think that the low level low will be but lets talk about performance [here](./The%20preformance%20Closures%20and%20Iterators.md).
|
@ -13,7 +13,7 @@ It will cover:
|
|||||||
- [*Closures*](./Closures.md) - a function-like construct you can store in a variable
|
- [*Closures*](./Closures.md) - a function-like construct you can store in a variable
|
||||||
- [*Iterators*](./Iterators.md) - a way of processing a series of elements
|
- [*Iterators*](./Iterators.md) - a way of processing a series of elements
|
||||||
- How to use colsure and iterators to [improve the I/O project (minigrep)](./Improving%20The%20IO%20Project.md)
|
- How to use colsure and iterators to [improve the I/O project (minigrep)](./Improving%20The%20IO%20Project.md)
|
||||||
- The preformance of closures and iterators (Spoiler alert: they are faster than you might think!)
|
- [The preformance of closures and iterators](./The%20preformance%20Closures%20and%20Iterators.md) (Spoiler alert: they are faster than you might think!)
|
||||||
|
|
||||||
We have already covered some other Rust freatures, such as pattern matchin and enums, that are also influenced by the functional style.
|
We have already covered some other Rust freatures, such as pattern matchin and enums, that are also influenced by the functional style.
|
||||||
|
|
||||||
|
0
The preformance Closures and Iterators.md
Normal file
0
The preformance Closures and Iterators.md
Normal file
Loading…
x
Reference in New Issue
Block a user