mirror of
https://github.com/microsoft/RustTraining.git
synced 2026-05-06 06:06:43 -04:00
@@ -64,7 +64,7 @@ fn main() {
|
||||
</details>
|
||||
|
||||
# Rust iterators
|
||||
- Iterators are one of the most powerful features of Rust. They enable very elegant methods for performing operations on collections, including filtering (```filter()```), transformation (```map()```), filter and map (```filter_and_map()```), searching (```find()```) and much more
|
||||
- Iterators are one of the most powerful features of Rust. They enable very elegant methods for performing operations on collections, including filtering (```filter()```), transformation (```map()```), filter and map (```filter_map()```), searching (```find()```) and much more
|
||||
- In the example below, the ```|&x| *x >= 42``` is a closure that performs the same comparison. The ```|x| println!("{x}")``` is another closure
|
||||
```rust
|
||||
fn main() {
|
||||
|
||||
Reference in New Issue
Block a user