9cf271fe96
Note that the method foo.each() is not de-moded, nor the other vec routines.
8 lines
126 B
Rust
8 lines
126 B
Rust
fn main() {
|
|
let mut sum = 0;
|
|
for vec::each(~[1, 2, 3, 4, 5]) |x| {
|
|
sum += *x;
|
|
}
|
|
assert (sum == 15);
|
|
}
|