There could be any number of reasons
why you might want to use {.&> instead
of {."0 .

a. The right argument is boxed. e.g. 
x is a boxed list of words, and you
want the first 3 letters of each word:

   ] x=: ;:'any number of reasons'
+---+------+--+-------+
|any|number|of|reasons|
+---+------+--+-------+
   3{.&>x
any
num
of 
rea

b. The left argument is boxed.

c. The right argument is a numeric
constant and so {"0 would force the
use of an interposing ] or () .  {.&>
would not:
   _1 _2 _3 {."0 ] 4 5 6
4 0 0
0 5 0
0 0 6
   _1 _2 _3 {.&> 4 5 6
4 0 0
0 5 0
0 0 6



----- Original Message -----
From: gary ng <[email protected]>
Date: Wednesday, May 13, 2009 18:14
Subject: Re: [Jprogramming] Newbie question about {.&>
To: Programming forum <[email protected]>

> On Wed, May 13, 2009 at 6:47 AM, Devon McCormick 
> <[email protected]> wrote:
> 
> > Hi -
> >
> > you might want to learn more about "rank":
> > http://www.jsoftware.com/jwiki/Essays/Rank .
> >
> 
> Thanks Devon, Don and Bill for the explanation about ranks and other
> alternatives. Need some time to read the ranks stuff in more detail.
> 
> Are there any hidden 'gem' or reason to say '{.&>' rather than 
> '({."0)' as
> to me the only reason for the &> is to modify the rank of {. ?
> 
> It seems to be using the 'side effect'(force rank 0 because 
> of  '>'), for an
> experienced Jer, it may be very obvious but still a questionable 
> practice ?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to