Thanks. Didn’t realise the significance of the change. Have now got it to work.
There is a feature of F:. which I find confusing. The x argument to u F:. v appears to be the initial condition while the items of y (I understand) are the items to be processed. However insofar as v is concerned, the roles of x and y are reversed. That is each y item becomes x for v as while the result of the previous application of v is assumed to be y. Why this design? Isn’t it more natural to think of the result of each iteration as the new “initial condition.” (ie x) and the y for v as the next item to be processed — ie the relevant item of y as passed to (u F:. v) Having said that I find F:. an impressive addition. > On 2 Jul 2020, at 10:14 am, Henry Rich <[email protected]> wrote: > > Fold changed in 9.02, reversing the meaning of u and v. You have 9.01 and > are expecting the old interpretation. NuVoc is for 9.02 (it has a note to > that effect IIRC). > > Henry Rich > > On 7/1/2020 7:29 PM, Piet de Jong wrote: >> Started looking at fold — seems a very useful new verb. >> However couldn’t get it to work >> >> Engine: j901/j64avx2/darwin >> Release-e: commercial/2020-01-29T12:41:32 >> Library: 9.01.21 >> Qt IDE: 1.8.6/5.12.7(5.12.7) >> Platform: Darwin 64 >> Installer: J901 install >> InstallPath: /applications/j901 >> >> Here is the what happens when I run the example from the vocabulary >> >> u >> 3 : 0 >> z=. -y >> z [smoutput ' u' ; y ; '-->' ; z >> ) >> v >> 4 : 0 >> z=. y + 0.01 >> z [smoutput x ; 'v' ; y ; '-->' ; z >> ) >> y >> 100 0.1 1.1 2.1 3.1 >> u F:.v y >> |domain error >> | u F:.v y >> >> Any help much appreciated. >> >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > -- > This email has been checked for viruses by AVG. > https://www.avg.com > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
