summary refs log tree commit diff
path: root/src/test/run-pass/block-arg-can-be-followed-by-call.rs
blob: c3bb0cb77a703315f51a8ce36bee62e397174d67 (plain)
1
2
3
4
5
6
fn main() {
    fn f(i: uint) -> uint { i }
    let v = ~[-1f, 0f, 1f, 2f, 3f];
    let z = do vec::foldl(f, v) |x, _y| { x } (22u);
    assert z == 22u;
}