Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!utnut!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!news-feed-1.peachnet.edu!umn.edu!csus.edu!sfsuvax1.sfsu.edu!emclean
From: emclean@sfsuvax1.sfsu.edu (Emmett McLean)
Subject: Re: J: Amending entries, rows, blocks Ques: tacit def of conjunctions?
Message-ID: <1993Apr2.205608.9435@csus.edu>
Keywords: J, amend, tacit
Sender: news@csus.edu
Organization: San Francisco State University
References: <1993Apr2.004735.38228@Lehigh.EDU>
Date: Fri, 2 Apr 1993 20:56:08 GMT
Lines: 25

NB. >Here is the question.  Amend is a conjuction that has a syntax that is 
NB. >something like  data indices} matrix.  Here, "am" is a verb
NB. >defined so that the
NB. >use is  (data;indices) am matrix.  Can I define a conjuntion "am" that
NB. >takes the same input and output that this "am" does?  Tacitly?

NB. Something like: 

   data =. >&(0&{)
   indices =.  $@] #. >&(1&{)@[
   matrix =. ]
   amTacit =. data`indices`matrix}

NB. or, as a one liner : 

   amTacit2 =. >&(0&{)@[`($@] #. >&(1&{)@[)`]}
NB. 
NB.    These only work on versions 6.1 and 6.2.  I don't _think_ there
NB.    is a way to write am tacitly without the newer construct.
NB. 
NB.    By the way, it was suggested that the ammendment verbs in the
NB.    jfaq page2 draft be made more readable. Something like what
NB.    you see above.
NB. 
NB.    Emmett
