On Fri, Apr 05, 2013 at 08:36:51AM -0400, Chris K. Jester-Young wrote: > > The clarity of this code could greatly benefit from some helper > > procedures. One possibility would be a procedure that takes a promise > > and two continuation arguments: one to call if the promise has already > > been computed, and another to call if it has not yet been. Another > > possibility would be to simply have a predicate that tells whether a > > promise has already been computed. > > I was actually mimicking the style used in the SRFI 45 reference > implementation of delay. If we change this here, we should also > correspondingly change delay. The two continuations thing is probably > worth trying. Attached is a patch for implementing this. Whether this results in "greatly benefitted clarity" is debateable, but it was worth a try. :-) Cheers, Chris.