Hello,

Is there an easier(and more general) way of doing "skipping prefix"?
With "skipping prefix", I mean the start point of each group could be
1 or greater.

  sp=:1 : 'u&> ((1 0 $~ #) # ]) 3 <\ y'

  <sp i.10
+-----+-----+-----+-----+
|0 1 2|2 3 4|4 5 6|6 7 8|
+-----+-----+-----+-----+

  +/sp i.10
3 9 15 21

Maybe, "2 3 u sp y" is better, which moves the start point of each
group by 2 and the size of the group is 3.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to