Created
November 28, 2012 17:24
-
-
Save ianb/4162673 to your computer and use it in GitHub Desktop.
smalltalk introspection?
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
Object extend [ | |
makeAdder: value [ | |
^ [ :x | x + value] | |
] | |
]. | |
closure := Object new makeAdder: 5. | |
"Now: how to you inspect the closure object to reveal that x == 5 ?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment