add a ReverseIter trait

This commit is contained in:
Daniel Micay 2013-02-07 19:35:18 -05:00
parent 66d5030763
commit 3e0a28c7da
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ pub trait BaseIter<A> {
pure fn size_hint(&self) -> Option<uint>;
}
pub trait ReverseIter<A>: BaseIter<A> {
pure fn each_reverse(&self, blk: fn(&A) -> bool);
}
pub trait ExtendedIter<A> {
pure fn eachi(&self, blk: fn(uint, v: &A) -> bool);
pure fn all(&self, blk: fn(&A) -> bool) -> bool;