From ab6a913a5d17f567c9850b343c1118513b3e6adb Mon Sep 17 00:00:00 2001 From: rongyi Date: Thu, 2 Apr 2026 17:51:13 +0800 Subject: [PATCH] Update ch12-closures.md there's no filter_and_map --- c-cpp-book/src/ch12-closures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-cpp-book/src/ch12-closures.md b/c-cpp-book/src/ch12-closures.md index 4d1402e..d21047e 100644 --- a/c-cpp-book/src/ch12-closures.md +++ b/c-cpp-book/src/ch12-closures.md @@ -64,7 +64,7 @@ fn main() { # 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() {