Loops/For with a specified step: Difference between revisions
m
→{{header|J}}
m (→{{header|J}}) |
m (→{{header|J}}) |
||
Line 1,528:
2 4 6 8 who do we appreciate?</syntaxhighlight>
Note that an expression of the form <code>(start, step) (p. i.) count</code> will generate the specified numbers (<code>p.</code> is J's polynomial primitive, <code>i.</code> is J's index generator). So, to generate the above sequence of integers we could have used:
<syntaxhighlight lang=J> 0 2 (p. i.) 5
|