Dear all,
how do you usually generate a sequence of integers from 'a' to 'b' with
a step 's'?
If I ignore the step, yesterday I wrote
interval=.{.+(i. @ >: @ ({:-{.))
interval 5 19
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
but that seems overly complicated...
Then I can include the step in this way
_3 {.\ interval 5 19
5 8 11 14 17
Putting the two parts together would make it even more complicated.
There must be a better way...
Thanks
Ruda
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm