Problems with SRFI document Gordon Weakliem (09 Sep 2004 17:30 UTC)
Re: Problems with SRFI document Michael Sperber (11 Sep 2004 10:40 UTC)
Re: Problems with SRFI document Andre van Tonder (11 Sep 2004 13:23 UTC)
Re: Problems with SRFI document Andre van Tonder (11 Sep 2004 14:12 UTC)
Re: Problems with SRFI document bear (11 Sep 2004 23:24 UTC)
Re: Problems with SRFI document David Van Horn (12 Oct 2004 16:20 UTC)
Re: Problems with SRFI document Alexander Thiel (12 Jan 2005 08:52 UTC)

Re: Problems with SRFI document Alexander Thiel 05 Jan 2005 09:03 UTC

David Van Horn <dvanhorn-uTS83RNB0zM3xxxxxx@public.gmane.org> writes:

>
> I've checked in changes to address both of these issues.  Please
> let me know if any other problems exist with the reference
> implementation.
>
> David
>

Hello David,

actually there is another problem with the reference
implementation. With the code from
http://srfi.schemers.org/srfi-40/srfi-40.html downloaded on January
5th, 2005 I get the following error:

> mzscheme -L 9.ss srfi --load srfi-40-ref.scm
Welcome to MzScheme version 208, Copyright (c) 2004 PLT Scheme, Inc.
> (stream-car (stream 1 2 3))
car: expects argument of type <pair>; given lazy

The problem is in the definition of stream-low-level-force which for
the chosen implementation of a promise I believe should read:

(define (stream-low-level-force promise)
    (case (car promise)
      ((eager) (cdr promise))
      ((lazy)  (let ((promise* (stream-promise ((cdr promise)))))
                 (if (not (eqv? (car promise*) 'eager))
                     (begin (set-car! promise (car promise*))
                            (set-cdr! promise (cdr promise*))
                            (set-car! promise* promise)))
                 (stream-low-level-force promise)))))

Cheers,

        Alex