Hi, Reading this subject and surfing to http://ostermiller.org/calc/sum.html, I did notice that not all the examples given there come up with the same result using the two verbs mentioned in the thread started by Mike Day:
mrs =: >./@(- <./\)@(+/\) mis =: [: >./ [: (0 >. +)/\. 0 ,~ ] ------> (mrs-:mis) 1 2 3 4 5 0 mrs 1 2 3 4 5 14 mis 1 2 3 4 5 15 The last one should be the answer according to Ostermiller? This phenomenon seems to occur when all elements are > 0. I made a kind of adjustment to the verb 'mrs' more or less based on the rightmost part of the verb 'mis'. In other words prefixing the sequence with a zero. mrs2 =: >./@(- <./\)@(+/\)@(0,]) mrs2 2 4 9 12 27 mis 2 4 9 12 27 mrs2 2 _4 9 _12 9 mis 2 _4 9 _12 9 So, when the sequence is an alternating one, then no difference will be noticed between mrs and mis? Greetings @@1<=>arie ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
