I have always compared @ and @: to pipe. In UNIX pipe linked each item to
be passed from one function to the next. Where in DOS the pipe created a
file of all items using the first function, then passed the file it to the
next function.

To me the difference gives the dependence between items. @ says that there
is no dependence between items. Where @: says that there is. This has
implications if J is to implement parallel processing over items. The
current implementation favors using @: for performance. But who knows what
happens in the future. I favor making it clear the interactions between
items rather than performance.

On Fri, Nov 16, 2012 at 2:38 PM, km <[email protected]> wrote:

> Here is my attempt to explain the difference between conjunctions @: and @
>
>    ]A =: 2 3 $ 1 2 3 4 5 6
> 1 2 3
> 4 5 6
>    |. A  NB. Reverse matrix A
> 4 5 6
> 1 2 3
>    |."1 A  NB.  Reverse each row of A (each 1-cell)
> 3 2 1
> 6 5 4
>    |. @: (|."1) A  NB.  Reverse the result of |."1 A
> 6 5 4
> 3 2 1
>    |. @ (|."1) A  NB. Reverse each reversed row of A
> 1 2 3
> 4 5 6
>
> In general, f @: (g"r) y means apply f to the result of g"r y and f @
> (g"r) y means apply f separately to the results of applying g to each
> r-cell of y.  When r is not specified, the right rank of g is used.
>
> You may be able to guess from this what happens when f @: g and f @ g are
> used dyadically!
>
> Kip Murray
>
> Sent from my iPad
>
> ----------------------------------------------------------------------
> 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