Created
June 18, 2012 22:21
-
-
Save Araq/2951106 to your computer and use it in GitHub Desktop.
another closure issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc outer = | |
var x = 0 | |
proc innerB() = | |
capture x | |
while true: | |
var y = 0 | |
proc innerA = | |
innerB() # ouch | |
capture x, y | |
innerA() | |
innerB() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment