diff --git a/src/advance/functional-programing/iterator.md b/src/advance/functional-programing/iterator.md index 00ca73cc..8772541f 100644 --- a/src/advance/functional-programing/iterator.md +++ b/src/advance/functional-programing/iterator.md @@ -435,7 +435,7 @@ let val = v.iter() // 每两个元素剔除一个 // [1, 3, 5] .filter(|&(idx, _)| idx % 2 == 0) - .map(|(idx, val)| val) + .map(|(_, val)| val) // 累加 1+3+5 = 9 .fold(0u64, |sum, acm| sum + acm);