[Jprogramming] Bond, Compose, Atop, etc.

Raul Miller rauldmiller at gmail.com
Thu Oct 27 22:32:28 HKT 2011


On Thu, Oct 27, 2011 at 10:13 AM, David Vaughan
<purpleblues13 at googlemail.com> 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 at 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?
>
>   {. at 2&x:@(+%)/ 1 2
> |domain error

{. at 2 is your problem here.  2 is not a verb.

> |       {. at 2&x:@(+%)/1 2
>   {.&2&x:@(+%)/ 1 2

1.5 {. 2
|domain error

-- 
Raul


More information about the Programming mailing list