Created
March 14, 2012 02:59
-
-
Save startling/2033664 to your computer and use it in GitHub Desktop.
playing with io's do()
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
# so, because of scoping inside of do(...) I have to do: | |
Color greyscale := method( | |
i := intensity | |
grey := Color clone | |
grey red := i | |
grey blue := i | |
grey green := i | |
return grey | |
) | |
# and I can't do anything like this? | |
Color greyscale := method( | |
i := intensity | |
grey := Color clone do( | |
red := i | |
blue := i | |
green := i | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment