[plt-scheme] Re: Lazy streams in SICP

From: geb a (geb_a at yahoo.com)
Date: Thu May 18 12:39:42 EDT 2006

In SICP, lazy streams are formulated as follows...

(define (cons x y)
  (lambda (m) (m x y)))
(define (car z)
  (z (lambda (p q) p)))
(define (cdr z)
  (z (lambda (p q) q)))

(define ones (cons 1 ones))

Running this code in mzscheme yields the following

reference to undefined identifier: ones

I assume that there is some fundamental difference
between mzscheme and MIT's version of scheme that
causes this?  Is there a workaround solution?


Dan Anderson

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Posted on the users mailing list.