2011-12-29 09:49:33 -08:00
|
|
|
fn main() {
|
2012-01-23 14:59:00 -08:00
|
|
|
fn f(i: fn() -> uint) -> uint { i() }
|
2012-06-29 16:26:56 -07:00
|
|
|
let v = ~[-1f, 0f, 1f, 2f, 3f];
|
2012-06-30 16:19:07 -07:00
|
|
|
let z = do do vec::foldl(f, v) |x, _y| { x } || { 22u };
|
2011-12-29 09:49:33 -08:00
|
|
|
assert z == 22u;
|
|
|
|
}
|