I get nothing like this, only what one would expect: kk=.i.5 kk 0 1 2 3 4 kk=.>:kk kk 1 2 3 4 5 i.5 0 1 2 3 4
You must have done something else too but I can't think what it might be as I don't think re-assignment of J primitive is possible (in J). On Tue, Sep 14, 2021 at 10:03 AM Pablo Landherr <pablo.landh...@gmail.com> wrote: > No. I get: > > kk=.i.5 > > kk > > 0 1 2 3 4 > > kk=.>:kk > > kk > > 1 2 3 4 5 > > i.5 > > 0 1 2 3 4 > > On Tue, Sep 14, 2021 at 3:59 PM Jon Quant <quanty....@gmail.com> wrote: > > > Dear all, > > > > I have tried the following code and get unexpected results and wanted > your > > seasoned advice. > > > > kk=.i.5 > > kk > > 0 1 2 3 4 > > kk=.>:kk > > kk > > 1 2 3 4 5 > > i.5 > > 1 2 3 4 5 > > kk=.>:kk > > i.5 > > 2 3 4 5 6 > > > > So this modifies the behaviour of the 'i.' verb! Is there a (functional > > programming) grammar rule that says we must not modify a variable/noun > > which is also in the expression? > > > > Thanks > > Jon > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA Quantitative Consultant ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm