Loops/For with a specified step: Difference between revisions
Content added Content deleted
m (→{{header|J}}) |
m (→{{header|J}}) |
||
Line 1,528: | Line 1,528: | ||
2 4 6 8 who do we appreciate?</syntaxhighlight> |
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 (p. is J's polynomial primitive, i. is J's index generator). So to generate the above sequence of integers we could have used: |
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 |
<syntaxhighlight lang=J> 0 2 (p. i.) 5 |