The issue is rank.

+ is rank zero, and atop has rank: mv lv rv

The convention here is m: monadic, l: left dyadic, r: right dyadic and
v refers to the verb on the right (u would refer to the verb on the
left).

So the monadic rank of <./@+ is the monadic rank of +,
the left dyadic rank of <./@+ is the left dyadic rank of +
the right dyadic rank of <./@+ is the right dyadic rank of +

That can be a little confusing because (for example) there are two
right dyadic ranks involved here. the rv refers to the right dyadic
rank of + and its position in the rank specification indicates that
this is the specification for the right dyadic rank of the resulting
verb.

I hope that is clear?

Anyways, to achieve what you want, you can use <./@(+"_)

Or, equivalently <./@:+

And there are a few other ways of achieving this.

Thanks,

-- 
Raul

On Thu, Feb 27, 2014 at 8:15 PM, Jon Hough <[email protected]> wrote:
> Another beginner question . I'm trying to understand how atop (@) works.I've 
> read this http://www.jsoftware.com/help/dictionary/d620.htm
> But I made my own example and the results are not as I expected.I made a 
> tacit dyadic verb:
> func =: <./ @ +
> Here + is dyadic and  <./ is monadic.
> If I do
>  1 2 func 3 4
> The result is
> 4 6
> But from the above link: x u@v y ↔ u x v y
>
> So this verb is equivalent to adding the two vectors x and y and then finding 
> the min element of the resulting vector. So I think the result should just be 
> 4.In other words, why is my result 4 6?
> Indeed, if I break up the verb and do:
> 1 2 + 3 4
> result: 4 6   <./ 4 6
> result: 4
> This is as I think it should be. Any help appreciated.
> Thanks,Jon
> ----------------------------------------------------------------------
> 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