Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!zaphod.mps.ohio-state.edu!uunet.ca!geac!itcyyz!yrloc!hui
From: hui@yrloc.ipsa.reuter.COM (Roger Hui)
Subject: Re: Function evaluation in J
Message-ID: <1992Apr29.060501.16621@yrloc.ipsa.reuter.COM>
Organization: Iverson Software Inc.
References: <92115.154130HAC041@DJUKFA11.BITNET> <ROCKWELL.92Apr24214315@socrates.umd.edu> <92118.105732HAC041@DJUKFA11.BITNET>
Date: Wed, 29 Apr 92 06:05:01 GMT
Lines: 36

Konrad Hinsen writes:
>                               ... Since the dictionary is
> supposed to be the definitive definition of the language, everything
> should be clear from what it says. Taking the definition of @,
> <@|.@> should be the same as <&|.&>, which is true. Next, the parsing
> rules state that this expression is equivalent to (<&|.)&>, which
> is also true. Applying the definition of &, (<&|.)&>c should be
> the same as (<&|.)>c, which however does not agree with the actual
> behaviour of J 4.1.
 
See the opening paragraph on page 6 of the dictionary, which applies
to all definitional entries.  In particular, the second sentence say:
"The ranks of each verb or derived verb are shown in parentheses,
with unbounded rank denoted by _, and with ranks dependent on ranks of 
argument verbs show as mu, lv, rv, etc.".  Thus, in the entry for u@v:
 
  ATOP (mv)     u@v y  is the same as u&v y.
  ATOP (lv rv)  x u@v y is u x v y.  For example, 3|@-7 is 4.
 
The relations "is the same" ("is") are with respect to arguments of
ranks bounded by mv (lv and rv).
 
> Of course the problem of ranks remains, and that probably explains
> why the results of <&|.&>c and <|.>c are different. But still a
> clear definition of the first expression is lacking; if & is defined
> in terms of a simple sequence of functions, but no simple sequence
> of functions does the same as a composition using &, then the
> definition is not satisfactory.
 
Since rank is pervasive and uniform, the definition is at the front
on page 2 in the general description on nouns and on pages 3 and 4 
in the general description on verbs, and not repeated in every entry.

------------------------------------
Roger Hui, Iverson Software Inc., 33 Major Street, Toronto, Ontario  M5S 2K9
Phone: (416) 925 6096;  Fax: (416) 488 7559
