The change you propose is non-trivial and has consequences
that may surprise you (and many others, I expect).

Suppose f is <"_1, and you make the "combining rank" of
f be _1 instead of the current _ .  ("Combining rank" was
the term used in some papers in the late 1980s that
dealt with this issue in SAX (SHARP APL Unix)).

So the ranks of ]...@f would be _1 (_1 _1 _1).  Suppose the
argument x is i.2 3 4.  Since the ranks of ]...@f are _1,
x is split into the cells i.3 4 and 12+i.3 4 and you apply
]...@f to each cell.  Then, according to the definition of @,
you apply ] atop the result of f on the cells.  Since f
itself has rank _1, _its_ argument cells are i.4, 4+i.4,
8+i.4 from the first cell of x, and 12+i.4, 16+i.4, and 20+i.4
from the second cell of x.  So the over all result of ]...@f x
would be <"_1"_1 i.2 3 4 (<"1 i.2 3 4) rather than the 
current <"_1 i.2 3 4 .  In any case, the result of ]...@f 
would different from the result of f .



----- Original Message -----
From: Zsbán Ambrus <[email protected]>
Date: Wednesday, November 10, 2010 5:41
Subject: Re: [Jprogramming] Atop u...@v with v of negative monadic rank
To: Programming forum <[email protected]>

> Let me try to explain why I asked for the change.
> 
> On Wed, Nov 10, 2010 at 12:41 PM, Dan Bron <[email protected]> wrote:
> > [1] The reason negative ranks are covered with unbounded ranks 
> is [..]  And since "_ is a no-op (never changes the result of a 
> verb), it can always serve as a placeholder (this is why it is 
> reasonable that e.g. *:^:_1 or (* + %) have unbounded rank when 
> queried with b.  even though they're obviously & permanently scalar).
> 
> That's my problem here: (f"_ _ _) does mean just (f), so representing
> the rank with (_ _ _) is fine.  However, here, the queried 
> rank is (1
> _ 1) and (f"1 _ 1) is not the same as (f).  I'm asking that 
> you change
> the queried rank in some way that (f"f) always has the same 
> meaning as
> just f has.
> 
> On Wed, Nov 10, 2010 at 11:40 AM, Zsbán Ambrus 
> <[email protected]> wrote:
> >   f=: ;"_1 1
> >   'ab' f i.2 3
> > +-+-----+
> > |a|0 1 2|
> > +-+-----+
> > |b|3 4 5|
> > +-+-----+
> >  f b. 0
> >1_ 1
> 
>    'ab' f"1 _ 1 i. 2 3
> +-+-----+
> |a|0 1 2|
> +-+-----+
> |b|0 1 2|
> +-+-----+
> 
> +-+-----+
> |a|3 4 5|
> +-+-----+
> |b|3 4 5|
> +-+-----+
> 
> Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to