Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Created March 19, 2020 15:49
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 AlexDaniel/3790373044a86be069a021b73c13c90b to your computer and use it in GitHub Desktop.
Save AlexDaniel/3790373044a86be069a021b73c13c90b to your computer and use it in GitHub Desktop.
sub bar(&some-code) {
LEAVE { say ‘left’ };
some-code()
};
sub foo {
bar { return 42 } # this is a block of code that `return`s from `foo` but is executed in `bar`
};
for ^2 { say foo }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment