What was the solution you anticipated?
----- Original Message ----- From: Raul Miller <[EMAIL PROTECTED]> Date: Thursday, March 13, 2008 5:55 Subject: Re: [Jprogramming] tree sum and difference To: Programming forum <[email protected]> > Roger Hui wrote: > tsum3=: 4 : 0 > d=. ((</[EMAIL PROTECTED]) y) -.&.> i=. ~.y > while. 1 do. > c=. #&>d > j=. (*c)#i > i=. c#i > e=. ;d > t=. i +//. e{x > if. 0 *./@:= t do. x return. end. > x=. (t+j{x) j}x > d=. i <@;/. (j i. e){d,a: > i=. j > end. > ) > > That is significantly faster than I anticipated. > > (and, considerably more complicated than tdiff, > but that complication is intrinsicly a part of this > problem.). ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
