Email list hosting service & mailing list manager

Re: Bug fix Andre van Tonder (12 Jun 2004 01:50 UTC)
Re: Bug fix Matthias Radestock (12 Jun 2004 07:21 UTC)
Re: Bug fix Andre van Tonder (12 Jun 2004 15:07 UTC)

Re: Bug fix Matthias Radestock 12 Jun 2004 07:21 UTC

Andre van Tonder wrote:
> Thank you to Alexandro and John for pointing out the bugs in the
> implementation.  I have fixed them and included the suggested extra
> tests in the update below.

> (define (force promise)
>    (let ((content (unbox (unbox promise))))
>      (case (car content)
>        ((eager) (cdr content))
>        ((lazy)  (let* ((promise* ((cdr content)))
>                        (content  (unbox (unbox promise))))

Shouldn't that last line use promise*? If so, how come your tests pass?

>                   (when (not (eqv? (car content) 'eager))    ; for
> reentrancy test 3
>                     (set-box! (unbox promise) (unbox (unbox promise*)))
>                     (set-box! promise* (unbox promise)))
>                   (force promise))))))

Matthias.