10 lines
142 B
Rust
10 lines
142 B
Rust
|
#[inline]
|
||
|
fn iter<T>(v: [T], f: fn(T)) {
|
||
|
let i = 0u;
|
||
|
let n = vec::len(v);
|
||
|
while i < n {
|
||
|
f(v[i]);
|
||
|
i += 1u;
|
||
|
}
|
||
|
}
|