rust/src/test/run-pass/bind-trivial.rs

12 lines
141 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
fn f(int n) -> int {
ret n;
}
fn main() {
let fn(int) -> int g = bind f(_);
let int i = g(42);
assert (i == 42);
2010-06-23 23:03:09 -05:00
}