Roger, To explain f would you call } item amend rather than amend ?
]a=: 100 (2 4 5}) a=:i.10 0 1 100 3 100 100 6 7 8 9 f=: 13 :'x (2 4 5}) y' 100 f i.10 0 1 100 3 100 100 6 7 8 9 Here's the example that is puzzling me. *i.5 0 1 1 1 1 */"0 i.5 0 1 2 3 4 Linda -----Original Message----- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Henry Rich Sent: Tuesday, September 09, 2014 4:54 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Replace one item of a list I don't think Ian meant, or said, that amend-in-place violates any rules. He said [J] actually does in-place updating (even though, at face value, J syntax does not permit such a thing). The key words are "at face value". I take that to mean that a beginner-to-advanced user, looking at the description of m}, would think that it always produces a complete new array. Ian's post makes it clear that he considering the inexpert J programmer's view of J. Henry Rich On 9/9/2014 12:35 PM, Roger Hui wrote: > I don't believe the messages you cited explained it. J syntax consists of > word formation as defined by ;: and parsing rules as defined by Section IIE > of the dictionary. How is amend-in-place not permitted by either part? > > > > On Tue, Sep 9, 2014 at 8:56 AM, Dan Bron <j...@bron.us> wrote: > >> Ian wrote: >>> Then it actually does in-place updating (even though, >>> at face value, J syntax does not permit such a thing). >> >> Roger responded: >>> Please explain why this is not permitted by J syntax. >> >> I believe Ian is expressing a thought recently raised by Erling Hellenas in >> [1], which I responded to here: >> >> http://www.jsoftware.com/pipermail/programming/2014-July/038030.html >> >> -Dan >> >> [1] "J and indexed replacement": >> http://www.jsoftware.com/pipermail/programming/2014-July/038068.html >> >> "In most languages indexed replacement is indexed replacement? In J >> and >> in most functional languages it is not? You get a brand new variable? >> So, why give the user the flawed impression he can still do indexed >> replacement and do amendments to variables/nouns? And at the same >> time >> in tacit code we pretend to only have functions? No variables/nouns >> to >> be amended? Just functional transformations?" >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm