2011-08-19 17:16:48 -05:00
|
|
|
fn force(f: &block() -> int) -> int { ret f(); }
|
2011-07-25 18:57:27 -05:00
|
|
|
fn main() {
|
2011-07-27 07:19:39 -05:00
|
|
|
let f = fn () -> int { ret 7 };
|
|
|
|
assert (force(f) == 7);
|
|
|
|
let g = bind force(f);
|
|
|
|
assert (g() == 7);
|
2011-08-19 17:16:48 -05:00
|
|
|
}
|