new, simpler approach to the iter library
This commit is contained in:
9
src/libcore/iter-trait/vec.rs
Normal file
9
src/libcore/iter-trait/vec.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
type IMPL_T<A> = [const A];
|
||||
|
||||
fn EACH<A>(self: IMPL_T<A>, f: fn(A) -> bool) {
|
||||
vec::each(self, f)
|
||||
}
|
||||
|
||||
fn SIZE_HINT<A>(self: IMPL_T<A>) -> option<uint> {
|
||||
some(vec::len(self))
|
||||
}
|
||||
Reference in New Issue
Block a user