1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-28 17:55:41 +02:00

Update iterator.md (#244)

* Update iterator.md

Adding a Speaker Note emphasizing that all most all functional programming toolbox over collections can be found in the `Iterator` documentation.

* Wordsmithing

Co-authored-by: Andrew Walbran <qwandor@google.com>
This commit is contained in:
Igor Petruk 2023-01-23 13:45:45 +00:00 committed by GitHub
parent 6b75f9e69c
commit 10bd1616cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,11 @@ fn main() {
<details>
`IntoIterator` is the trait that makes for loops work. It is implemented by collection types such as
`Vec<T>` and references to them such as `&Vec<T>` and `&[T]`. Ranges also implement it.
* `IntoIterator` is the trait that makes for loops work. It is implemented by collection types such as
`Vec<T>` and references to them such as `&Vec<T>` and `&[T]`. Ranges also implement it.
* The `Iterator` trait implements many common functional programming operations over collections
(e.g. `map`, `filter`, `reduce`, etc). This is the trait where you can find all the documentation
about them. In Rust these functions should produce the code as efficient as equivalent imperative
implementations.
</details>