NB. This looks like a bug. It was discussed briefly on the forum
NB. following a posting by Patrick Van Beek on 14 6 2008.
NB. I don't remember seeing anyhing further, so if I may
NB. I will mention it again.
NB. In a few words, +/ @: * can give a wrong result.
NB. To demonstrate with Patrick's data:
1 0 2 (+/ @: *) ( 3 2 $ 3 1 2 1 1 0)
7 3
NB. The correct result is 5 1, shown by replacing +
NB. with an equivalent verb, say [ + ] . I guess this
NB. avoids the changes to f/@:g mentioned in the release
NB. notes for J601
1 0 2 (([+]) / @: *) ( 3 2 $ 3 1 2 1 1 0)
5 1
NB. In J504, both of the above expressions give
NB. the correct result, 5 1
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm