2011-01-06 14:56:30 -06:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -*- rust -*-
|
2011-07-27 07:19:39 -05:00
|
|
|
fn f(n: int) -> int { ret n; }
|
2011-01-06 14:56:30 -06:00
|
|
|
|
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
let g: fn() -> int = bind f(10);
|
2011-07-27 07:19:39 -05:00
|
|
|
let i: int = g();
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (i == 10);
|
2011-08-19 17:16:48 -05:00
|
|
|
}
|