2011-09-12 11:27:30 +02:00
|
|
|
fn force(f: block() -> int) -> int { ret f(); }
|
2011-07-25 16:57:27 -07:00
|
|
|
fn main() {
|
2011-07-27 14:19:39 +02:00
|
|
|
let f = fn () -> int { ret 7 };
|
|
|
|
assert (force(f) == 7);
|
|
|
|
let g = bind force(f);
|
|
|
|
assert (g() == 7);
|
2011-08-19 15:16:48 -07:00
|
|
|
}
|