That is not really an issue in the general case where the index and/or the replacement value vary. As one would expect in the more general case. a=.100 b=.2 a b} A=.i.5 0 1 100 3 4
On Mon, Sep 8, 2014 at 9:13 AM, Linda Alvord <[email protected]> wrote: > The verb is amend and the main issue is that you must separate 100 and 2 > or > they become the list 100 2 > > 100 (2)} A=.i.5 > 0 1 100 3 4 > > (100) 2} A=.i.5 > 0 1 100 3 4 > > > Linda > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Roger Hui > Sent: Monday, September 08, 2014 10:21 AM > To: Programming forum > Subject: Re: [Jprogramming] Replace one item of a list > > a=: i.5 > a > 0 1 2 3 4 > a=: 100 (2}) a > a > 0 1 100 3 4 > > > > On Mon, Sep 8, 2014 at 7:18 AM, Sebastian <[email protected]> wrote: > > > Hi, > > > > What is actually the best practice to replace one item of a list? > > > > The only way I know feels a bit complicated: > > > > a =: i. 5 > > 0 1 2 3 4 > > > > > > > > (2 {. a), 100, (3 }. a) > > > > 0 1 100 3 4 > > > > > > > > Best regards, > > > > Sebastian > > ---------------------------------------------------------------------- > > 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
