Merge pull request #73 from rongyi/patch-1

Update ch12-closures.md
This commit is contained in:
atulkhare4096
2026-04-04 09:02:00 -07:00
committed by GitHub
+1 -1
View File
@@ -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() {