Yeah, that's basically what I would do:

r=:".;._2]0 :0
9 8 6 1 2 2 2 6 8 7
5 4 8 4 2 7 9 1 4 1
4 3 3 7 7 0 6 7 6 6
)

m=:0 1 2 3;4 5 6;7 8;9

   m{L:0"1 r
+-------+-----+---+-+
|9 8 6 1|2 2 2|6 8|7|
+-------+-----+---+-+
|5 4 8 4|2 7 9|1 4|1|
+-------+-----+---+-+
|4 3 3 7|7 0 6|7 6|6|
+-------+-----+---+-+

Thanks,

-- 
Raul

On Tue, Apr 7, 2020 at 2:12 PM 'robert therriault' via Programming
<[email protected]> wrote:
>
> A little simpler I think, although it does use a hook to preprocess r
>
>     m (({ each)"1 0 <"1)  r
> ┌───────┬─────┬───┬─┐
> │9 8 6 1│2 2 2│6 8│7│
> ├───────┼─────┼───┼─┤
> │5 4 8 4│2 7 9│1 4│1│
> ├───────┼─────┼───┼─┤
> │4 3 3 7│7 0 6│7 6│6│
> └───────┴─────┴───┴─┘
>
> Cheers, bob
>
> > On Apr 7, 2020, at 11:00, Brian Schott <[email protected]> wrote:
> >
> > m(;@:((1{.~#)&.>)@[ <;.1 ])"1 r
> >
> >
> > --
> > (B=)
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to