2011-07-21 18:47:47 -05:00
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
#macro[[#apply[f, [x, ...]], f(x, ...)]];
|
2011-07-21 18:47:47 -05:00
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
fn add(a: int, b: int) -> int { ret a + b; }
|
2011-07-21 18:47:47 -05:00
|
|
|
|
2011-08-02 14:22:17 -05:00
|
|
|
assert (#apply[add, [1, 15]] == 16);
|
2011-08-19 17:16:48 -05:00
|
|
|
}
|