I=. 3 5 3
V=. 0 1 2 3 4 5 6 7 8 9
u=. ^&2
I (+/@(=/) u@:]^:["0 ]) V
0 1 2 81 4 25 6 7 8 9
ai=. ((@:]) (^:[) ("0)) ((+/@(=/))`)(`]) (`:6)
u ai
+/@(=/) u@:]^:["0 ]
I u ai V
0 1 2 81 4 25 6 7 8 9
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
- RE: [Jprogramming] Index replacement Jose Mario Quintana
- Re: [Jprogramming] Index replacement Oleg Kobchenko
- Re: [Jprogramming] Index replacement Oleg Kobchenko
