On Thursday 05 July 2007 11:20, Michael Vanier wrote: > Again, I'm sure this has been done before (and no doubt better); I'd > appreciate any pointers to previous work along these lines. Takusen is, if I recall correctly, based around a generalised fold supporting accumulation and early termination. Maybe have a look at that. Dan