Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!spool.mu.edu!eng.ufl.edu!usenet.ufl.edu!gatech!news-feed-1.peachnet.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jato!csi!csi.jpl.nasa.gov!sam
From: sam@csi.jpl.nasa.gov (Sam Sirlin)
Subject: Re: J: Amending entries, rows, blocks Ques: tacit def of conjunctions?
Message-ID: <1993Apr2.170929.18449@csi.jpl.nasa.gov>
Keywords: J, amend, tacit
Sender: usenet@csi.jpl.nasa.gov (Network Noise Transfer Service)
Nntp-Posting-Host: kalessin
Organization: Jet Propulsion Laboratory, Pasadena, CA
References:  <1993Apr2.004735.38228@Lehigh.EDU>
Date: Fri, 2 Apr 1993 17:09:29 GMT
Lines: 29

In article <1993Apr2.004735.38228@Lehigh.EDU>, reiterc@lafcol.lafayette.edu (Reiter Clifford A) writes:
|> Here is the question.  Amend is a conjuction that has a syntax that is 
|> something like  data indices} matrix.  Here, "am" is a verb
|> defined so that the
|> use is  (data;indices) am matrix.  Can I define a conjuntion "am" that
|> takes the same input and output that this "am" does?  Tacitly?

I asked this a while ago regarding my index function (same ideas as
your am). I didn't get an answer, so I assume the answer is no. It
seems that ammend, like the old bracket indexing, is somewhat
anomalous in the language and violates the gander principle: a user
can't make a whatever that does the same thing as ammend (what's good
for the goose is...).

The reason seems to be that reassignment requires 3 separate noun
arguments (yes, I know you can use a verb with ammend for the
index...): data, indicies, and matrix. Both traditional APL and J are
designed for monadic or dyadic functions, but not triadic functions.
This isn't much of limitation, as you can glue things togther and
unpack inside the function, but it is a conceptual limitation - the
solutions look somewhat "ugly". I actually prefer the traditional APL
solution of using brackets to separate out the three arguments. If
you're going to be analomous anyway, you might as well go all the way
and make it easy to use.

-- 
Sam Sirlin
Jet Propulsion Laboratory         sam@kalessin.jpl.nasa.gov

