Skip to content

Instantly share code, notes, and snippets.

@moritz
Created March 2, 2012 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moritz/1958280 to your computer and use it in GitHub Desktop.
Save moritz/1958280 to your computer and use it in GitHub Desktop.
Useless Macro ponderings
macro foo($x) {
sub greet($a) { say "LOL IT'S $a.uc()" };
quasi { greet {{{$x}}} }
};
sub greet($a) { say "hello $a" }
foo (my $y = 'masak');
greet $y
# expected output:
LOL IT'S MASAK
hello masak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment