On Thu, Oct 27, 2011 at 10:13 AM, David Vaughan
<[email protected]> wrote:
> I've been trying to properly understand how @,@:,&, and &: work, but I'm
> struggling a bit it would seem.
> My understanding of @ is that with more than one use in its dyadic form, you
> get this behaviour:
>
> x f@g@h y === f g x h y
Yes, assuming that x and y are cells that fit within the rank frame of h
> What is confusing me most is the interplay between them in longer trains of
> verbs. For example, why don't these expressions work?
>
> {.@2&x:@(+%)/ 1 2
> |domain error
{.@2 is your problem here. 2 is not a verb.
> | {.@2&x:@(+%)/1 2
> {.&2&x:@(+%)/ 1 2
1.5 {. 2
|domain error
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm