pad =: (1&$:@]) :  ((0,.~0,.0,~0,]) ^:[ ])

Thanks,

-- 
Raul

On Fri, May 3, 2019 at 12:35 PM Brian Schott <[email protected]> wrote:
>
> How do I create the verb `pad` below so that the first and the last
> expressions below produce the same result?
>
>    pad =: (1&$:@]) :  (0,.~0,.0,~0,]) ^:[ ]
>    $ 1 pad i. 3 4
> 5 6
>    $ 2 pad i. 3 4
> 7 8
>    $ pad i. 3 4
> 3 4 25 26
>
>
> --
> (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

Reply via email to