Loops/Foreach: Difference between revisions

(Nimrod -> Nim)
Line 1,235:
(fun i -> Printf.printf "%d\n" i)
collect_array</lang>
 
=={{header|Oforth}}==
 
<lang Oforth>func: monthsPrint { | o | Date.Months forEach: o [ o println ] }</lang>
 
But, apply can be used instead of a loop :
<lang Oforth>Date.Months apply(#println)</lang>
 
=={{header|Octave}}==
1,015

edits