Better, maybe not, but another way, maybe.

   (({.e.~ i.@(<./)@{. -.~i.@>:@(>./)@{.)expand </./) |:/:~data
┌─────┬───┬─┬┬─┐
│1 2 3│1 3│1││1│
└─────┴───┴─┴┴─┘
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to