Created
July 25, 2008 06:50
-
-
Save nrk/2400 to your computer and use it in GitHub Desktop.
Message manipulation at runtime in Io
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
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