rust/src/test/auxiliary/cci_iter_lib.rs

12 lines
185 B
Rust
Raw Normal View History

#[link(name="cci_iter_lib", vers="0.0")];
#[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;
}
}