X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/0e18da2b0ef0112146c38a2c01f4802a845abc41..5733ee975f1c72c27a4c2530f502786e777a8cc7:/src/part10.rs diff --git a/src/part10.rs b/src/part10.rs index 6fa8f1e..66d18ff 100644 --- a/src/part10.rs +++ b/src/part10.rs @@ -108,7 +108,7 @@ pub fn print_and_count(b: &BigInt) { //@ Rust provides a whole lot of methods on iterators that allow us to write pretty functional-style list manipulation. // Let's say we want to write a function that increments every entry of a `Vec` by some number, then looks for numbers larger than some threshold, and prints them. -fn inc_print_even(v: &Vec, offset: i32, threshold: i32) { +fn inc_print_threshold(v: &Vec, offset: i32, threshold: i32) { //@ `map` takes a closure that is applied to every element of the iterator. `filter` removes elements //@ from the iterator that do not pass the test given by the closure. //@