Loops/Foreach: Difference between revisions

Content added Content deleted
(Added Self version)
Line 1,619: Line 1,619:


=={{header|Self}}==
=={{header|Self}}==
<lang self>aCollection do: [ :element | element printLine ].</lang>
<lang self>aCollection do: [| :element | element printLine ].</lang>
(Provided that the objects in the collection understand the <code>printLine</code> method).
(Provided that the objects in the collection understand the <code>printLine</code> method).