Skip to content

Instantly share code, notes, and snippets.

@startling
Created March 14, 2012 02:59
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 startling/2033664 to your computer and use it in GitHub Desktop.
Save startling/2033664 to your computer and use it in GitHub Desktop.
playing with io's do()
# 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