On Thu, Sep 8, 2011 at 12:21 PM, David Vaughan
<[email protected]> wrote:
> Could you explain how the ":&.> part works please? I don't really understand 
> &. from the vocabulary section.
...
>>   ;":&.>1+i.20
>> 1234567891011121314151617181920

Given a verb V, the expression V&.> is equivalent to the expression <@:V@>

Or, more generally, given verbs V and W the expression V&.> is
equivalent to the expression W inv@:V@W

In other words, > (or W) is used as a preprocessor, and its inverse is
used as a post processor.

Note also that the rank of W determines the rank of later stages of
the pipeline.  Thus, since > is rank 0, each number is individually
formatted and boxed in ":&.>

And, in this case, I am relying on > doing nothing to numbers (other
than setting the rank of the verb).  So an alternate expression which
would do the same thing is:  ;<@:":"0>:i.20 or ;<@:":"0(1+i.20)

FYI,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to