core: Rename iter::reverse to iter::reversed for consistency with vec mod

This commit is contained in:
Brian Anderson
2012-02-12 22:11:42 -08:00
parent ad2f566ff2
commit 092c244d3a

View File

@@ -77,7 +77,7 @@ fn foldr<A:copy,B,IA:iterable<A>>(
self: IA, +b0: B, blk: fn(A, -B) -> B) -> B { self: IA, +b0: B, blk: fn(A, -B) -> B) -> B {
let b <- b0; let b <- b0;
reverse(self) {|a| reversed(self) {|a|
b = blk(a, b); b = blk(a, b);
} }
ret b; ret b;
@@ -88,7 +88,7 @@ fn to_list<A:copy,IA:iterable<A>>(self: IA) -> [A] {
} }
// FIXME: This could be made more efficient with an riterable interface // FIXME: This could be made more efficient with an riterable interface
fn reverse<A:copy,IA:iterable<A>>(self: IA, blk: fn(A)) { fn reversed<A:copy,IA:iterable<A>>(self: IA, blk: fn(A)) {
vec::riter(to_list(self), blk) vec::riter(to_list(self), blk)
} }
@@ -247,8 +247,8 @@ fn test_max_empty() {
} }
#[test] #[test]
fn test_reverse() { fn test_reversed() {
assert to_list(bind reverse([1, 2, 3], _)) == [3, 2, 1]; assert to_list(bind reversed([1, 2, 3], _)) == [3, 2, 1];
} }
#[test] #[test]