Anonymous user
Loops/For with a specified step: Difference between revisions
→{{header|Scheme}}: ++ sather
No edit summary |
(→{{header|Scheme}}: ++ sather) |
||
Line 377:
Output
<pre>2, 4, 6, 8, who do we appreciate?</pre>
=={{header|Sather}}==
See [[Loops/For#Sather]]: the implementation for <code>for!</code> allows to specify a step; an example of usage could be simply:
<lang sather> i :INT;
loop i := for!(1, 50, 2);
#OUT + i + "\n";
end;</lang>
(Print all odd numbers from 1 to 50)
=={{header|Scheme}}==
|