Randy wrote:
>  Lacking the case where an individual item has a sum <10,
>  But the problem so far seems undefined otherwise:

Sorry, I didn't understand your question.  Why are you  calculating  +/ 9 | y  ?

>   +/ 9| 85 334
>5  NB. should it be 23 = 13 + 10 ?

Yes, the sume of the digits of the input vector  85 334  should be  23  (i.e. 
+/ 8 5  3 3 4)  .  Both verbs (the original spec and Arie's version) produce 
this result:

           +/,.&.":85 334
        23
           10 +/@:,@:(#.^:_1) 85 334
        23

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to