On Wed, Jan 23, 2013 at 4:05 PM, bob therriault <[email protected]>wrote:

> Nice Thomas,
>
> I had not thought of oblique.
>
> You can still do this, although it is clunkier:
>
> <@(+:`*:`%/.) 3 4 5
> +---+
> |  6|
> | 16|
> |0.2|
> +---+
>

I was hoping to box each row as you attempted below...


>    <@(+:`*:`%/."0) 3 4 5
> +-+-+--+
> |6|8|10|
> +-+-+--+
>
> or better,
>
> +:`*:`%/. each 3 4 5  NB. each  is &.>
> +-+-+--+
> |6|8|10|
> +-+-+--+
>
>
>
... but these don't work correctly. If you look at the output it  doesn't
match your first example. +:`*:`%/. applies at rank zero, so each
application applies the whole gerund to just one item, the result being
only the first gerund gets executed each time.

I have not found any elegant way to recreate the old way of distributing a
verb across a gerund except by hand.

   (+:e)`(*:e)`(%e)/. 1 2 3
┌────────┐
│2       │
├────────┤
│4       │
├────────┤
│0.333333│
└────────┘


Cheers, bob
>
> On 2013-01-23, at 12:51 PM, Thomas Costigliola wrote:
>
> > <@(+:`*:`%)/. 3 4 5
>
> ----------------------------------------------------------------------
> 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