The &> (every open) says to take each item of the left argument and pair it
with each item of the right argument.So the take is done three times The
results is then put together making a rank two array. It is like _3 _2 _1
{."0] 3 2 1
0 0 3
0 2 0
1 0 0
On Tue, May 12, 2009 at 8:17 PM, gary ng <[email protected]> wrote:
> Hi,
> I am learning J and came across the above verb but failed to reason how it
> works.
>
> 3 2 1 {.&> 3 2 1
> 3 0 0
> 2 0 0
> 1 0 0
>
> _3 _2 _1 {.&> 3 2 1
> 0 0 3
> 0 2 0
> 1 0 0
>
> I understand the 'fill'(of those 0) but don't know why it can work on a
> list
> when the left operand is a list rather than an atom.
>
> would appreciate if someone can give me some insight.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm