rust/src/test/run-pass/fn-expr.rs

1 line
76 B
Rust
Raw Normal View History

2011-07-27 07:19:39 -05:00
fn main() { let x = fn (a: int) -> int { ret a + 1; }; assert (x(4) == 5); }