reference: improve lambda example

This commit is contained in:
Tshepang Lekhonkhobe 2015-07-05 14:49:08 +02:00
parent 912ab64a0d
commit da90ddb5fd

View file

@ -2970,10 +2970,8 @@ function argument, and call it with a lambda expression as an argument:
```
fn ten_times<F>(f: F) where F: Fn(i32) {
let mut i = 0i32;
while i < 10 {
f(i);
i += 1;
for index in 0..10 {
f(index);
}
}