Merge pull request #20 from avkrotov/reference
[rust-101.git] / src / part10.rs
index b586cd5057d3da50b4319dc207d324c589f2e4c0..66d18ff1fc63e23f68f609ff0234f98824807686 100644 (file)
@@ -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<i32>, offset: i32, threshold: i32) {
+fn inc_print_threshold(v: &Vec<i32>, 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.
     //@ 
@@ -141,4 +141,4 @@ fn filter_vec_by_divisor(v: &Vec<i32>, divisor: i32) -> Vec<i32> {
 // product of those numbers that sit at odd positions? A function that checks whether a vector contains a certain number? Whether all numbers are
 // smaller than some threshold? Be creative!
 
-//@ [index](main.html) | [previous](part09.html) | [raw source](https://www.ralfj.de/git/rust-101.git/blob_plain/HEAD:/workspace/src/part10.rs) | [next](part11.html)
+//@ [index](main.html) | [previous](part09.html) | [raw source](workspace/src/part10.rs) | [next](part11.html)