Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cauterite/2355ae9c2142180525275c6ef2b32ad7 to your computer and use it in GitHub Desktop.
Save Cauterite/2355ae9c2142180525275c6ef2b32ad7 to your computer and use it in GitHub Desktop.
function a($f) {& $f}
function main() {
$f = {write-host 'success'}
a {& $f} # stack-overflow
a {& $f}.getnewclosure() # okay
}
[void] (main)
@jzabroski
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment