diff --git a/src/libcollections/list.rs b/src/libcollections/list.rs index 1239ce702204c..035e17be90b06 100644 --- a/src/libcollections/list.rs +++ b/src/libcollections/list.rs @@ -118,34 +118,6 @@ fn push(ll: &mut @list, vv: T) { } */ -/// Iterate over a list -pub fn iter(list: @List, f: |&T|) { - let mut cur = list; - loop { - cur = match *cur { - Cons(ref head, tail) => { - f(head); - tail - } - Nil => break - } - } -} - -/// Iterate over a list -pub fn each(list: @List, f: |&T| -> bool) -> bool { - let mut cur = list; - loop { - cur = match *cur { - Cons(ref head, tail) => { - if !f(head) { return false; } - tail - } - Nil => { return true; } - } - } -} - #[cfg(test)] mod tests { use list::{List, Nil, head, tail};