rust/src/test/run-pass/macro-2.rs
2011-06-28 15:02:12 +00:00

5 lines
120 B
Rust

fn main() {
#macro("mylambda", x, body, {fn f(int x) -> int {ret body}; f});
assert(#mylambda(y,y*2)(8) == 16);
}