Anonymous user
Loops/Foreach: Difference between revisions
→{{header|Smalltalk}}
Line 2,378:
=={{header|Smalltalk}}==
<lang smalltalk>aCollection do: [ :element | element displayNl ].</lang>
Most modern Smalltalks allow for a selector symbol to be sent a <tt>value:</tt> message; which allows for the very compact:
<lang smalltalk>aCollection do:#displayNl.</lang>
|