Skip to content

Commit 10bd161

Browse files
igor-petrukqwandor
andauthored
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>
1 parent 6b75f9e commit 10bd161

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/traits/iterator.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ fn main() {
2929

3030
<details>
3131

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

0 commit comments

Comments
 (0)