Skip to content

Instantly share code, notes, and snippets.

@nrk
Created July 25, 2008 06:50
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 nrk/2400 to your computer and use it in GitHub Desktop.
Save nrk/2400 to your computer and use it in GitHub Desktop.
Message manipulation at runtime in Io
foo := block(str,
str asMutable asCapitalized println
)
foo call("my awesome string") // ==> My awesome string
foo message // ==> str asMutable asCapitalized println
foo message next // ==> asMutable asCapitalized println
foo message next next // ==> asCapitalized println
foo message next next setName("asUppercase") // ==> asUppercase println
foo call("my awesome string") // ==> MY AWESOME STRING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment