diff options
Diffstat (limited to 'src/libcore/iter.rs')
| -rw-r--r-- | src/libcore/iter.rs | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 8931b408826..816dc6d2255 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -20,7 +20,7 @@ use option::{None, Option, Some}; use vec; /// A function used to initialize the elements of a sequence -pub type InitOp<T> = &self/fn(uint) -> T; +pub type InitOp<T> = &'self fn(uint) -> T; pub trait BaseIter<A> { pure fn each(&self, blk: &fn(v: &A) -> bool); @@ -31,6 +31,10 @@ pub trait ReverseIter<A>: BaseIter<A> { pure fn each_reverse(&self, blk: &fn(&A) -> bool); } +pub trait MutableIter<A>: BaseIter<A> { + fn each_mut(&mut self, blk: &fn(&mut 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;  | 
