3 ms·
well actually-actually :-), (1 to: 10) do: [ :i | Transcript show: i ; cr]. also works in Pharo. Both are valid because: "to:do:" is a message understood
by astrobe_ 9y ago
well actually-actually :-),
(1 to: 10) do: [ :i | Transcript show: i ; cr].
also works in Pharo. Both are valid because:
"to:do:" is a message understood by the Number class
"to:" is a message also understood by the Number class that yields an Interval object, which understands the "do:" message.
- masklinn 9y ago> well actually-actually :-), I didn't say you could not build a message chain to do that, only that to:do: as shown in mpweiher's original comment is a single message ;)
- astrobe_ 9y agoYeah. My reply was more meant to show off more Smalltalk to pmoriarty and others that to one-up everyone :-)