P.S. this seems slightly faster:
foo2=: 4&{.@ (<;._2)@ (,&':');._2@ (,&'+')
(I think ,&'noun' sometimes does not require
a new copy of the argument.)
--
Raul
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
