Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utnut!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!purdue!mentor.cc.purdue.edu!mentor!weg
From: weg@mace.cc.purdue.edu (Eythan Weg)
Subject: Re: J: Amending entries, rows, blocks Ques: tacit def of conjunctions?
In-Reply-To: reiterc@lafcol.lafayette.edu's message of 2 Apr 93 00:47:35 GMT
Message-ID: <WEG.93Apr2153734@mace.cc.purdue.edu>
Sender: news@mentor.cc.purdue.edu (USENET News)
Organization: Purdue University
References: <1993Apr2.004735.38228@Lehigh.EDU>
Date: Fri, 2 Apr 1993 20:37:34 GMT
Lines: 28

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?

   Thanks for any ideas.  Cliff


I am not sure I get the point.  Amend is an adverb.  Is the point to
separate the data from the indices.  If yes, here is one way:
	index=.$@] #. [ NB.  Sam's index
	am=.(   (&index)@].])}
       
Now you can write:
  1  _1(>1 2; 2 4)am a  to replace arbitrary cells.
or 
  10 20 30 (|:1,: 1 2 3) am a to replace a row.  Of course,  one can
make special row and column replacement adverbs.
The expression in () is an arbitrary coordinates index construction
compatible with #.  .  The
amend itself is much more general.   But if not, would you amplify?   
			
Eythan
