Skip to content

Instantly share code, notes, and snippets.

@vendethiel
Created January 16, 2018 15:23
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 vendethiel/9e20afc889e1d042117784b5604a158f to your computer and use it in GitHub Desktop.
Save vendethiel/9e20afc889e1d042117784b5604a158f to your computer and use it in GitHub Desktop.
$ bin/007 -e='macro moo(x) { return quasi { (sub() { my y = {{{x}}} })() }; }; say(moo(42))'
scopes:
macro moo(x)
- variable x. Contains a Q::Literal::Integer (...).
quasi
sub
- variable y.
- refers to x. x's scope is the macro's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment