(3,:3) *:@{:;._3 list
36 25 49
Also look at
_3 u\ list
Henry Rich
On 5/27/2023 3:04 AM, Sanju Dutt wrote:
I know i can partition a list like this:
list=:_1 4 6 8 3 5 8 _1 7 4
<;._1 list
+-----------+---+
|4 6 8 3 5 8|7 4|
+-----------+---+
Here a new partition is made when encountering a _1.
But what if I want to apply an operation on every 3rd item in
list?
Do I need to write a verb for doing that?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm