Loops/For with a specified step: Difference between revisions
Content added Content deleted
No edit summary |
(→{{header|Scheme}}: ++ sather) |
||
Line 377: | Line 377: | ||
Output |
Output |
||
<pre>2, 4, 6, 8, who do we appreciate?</pre> |
<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}}== |
=={{header|Scheme}}== |