new, simpler approach to the iter library

This commit is contained in:
Niko Matsakis
2012-04-11 21:45:18 -07:00
parent 5eca3c2210
commit e348567f77
22 changed files with 328 additions and 168 deletions

View 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))
}