[Jprogramming] apply for table
Raul Miller
rauldmiller at gmail.com
Wed Jul 26 13:27:47 UTC 2017
Actually, a "0 on unboxed items.
+"(+ each)
+"0 0 0
That said,
('+/~';'*/~')128!:2 &.><1 0
┌───┬───┐
│2 1│1 0│
│1 0│0 0│
└───┴───┘
FYI,
--
Raul
On Wed, Jul 26, 2017 at 9:09 AM, 'Pascal Jasmin' via Programming
<programming at jsoftware.com> wrote:
> the difference between leaf (L:0) and each is that each implies a "_1 on unboxed items (actually for boxed items too).
>
>
> this also works
>
> ('+/~';'*/~') apply &:>"0 1 ] 1 0
>
>
> ('+/~';'*/~') apply &.>"0 1 < 1 0
>
>
> ________________________________
> From: Brian Schott <schott.brian at gmail.com>
> To: Programming forum <programming at jsoftware.com>
> Sent: Wednesday, July 26, 2017 9:02 AM
> Subject: Re: [Jprogramming] apply for table
>
>
>
> Yes, but I never would have found that because I don't believe I every use
> leaf. Apparently leaf produces a boxed result or something else is coming
> into play because the each (&.>) is no longer required. Or is the leaf
> being applied to both the y (1 0) and the x ('+/~';'*/~') ?
>
> Thanks,
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list