Category:Smalltalk: Difference between revisions

Content added Content deleted
Line 138: Line 138:


(a + 1) squared "send '+' to a, then send 'squared' to whatever we get from it"
(a + 1) squared "send '+' to a, then send 'squared' to whatever we get from it"

a , b "send the (binary) ',' message, which does collection-concatenation (arrays, strings, etc)


arr at:1 put:'foo' "send the 'at:put:' message to 'arr', passing two arguments, the integer '1' and a string"
arr at:1 put:'foo' "send the 'at:put:' message to 'arr', passing two arguments, the integer '1' and a string"