add the mutate_values method to the Map trait

This commit is contained in:
Daniel Micay 2013-03-13 17:07:23 -04:00
parent 4d8ddff52a
commit becad9bb07
6 changed files with 61 additions and 12 deletions

View file

@ -81,6 +81,10 @@ impl<T> Map<int, T> for cat<T> {
for self.each |&(_, v)| { if !f(v) { break; } loop;};
}
fn mutate_values(&mut self, f: &fn(&int, &mut T) -> bool) {
fail!(~"nope")
}
fn insert(&mut self, k: int, _: T) -> bool {
self.meows += k;
true