Commits

Moritz Heidkamp  committed bfa21e1

Don't cache recursively evaluated seq bodies

This change makes the infamous times3 test (see srfi-41) run in
bounded space.

  • Participants
  • Parent commits c239963

Comments (0)

Files changed (1)

File lazy-seq.scm

               (begin
                 (lazy-seq-value-set! seq value)
                 value)
-              (loop (realized-lazy-seq value)))))))
+              (loop ((lazy-seq-body value))))))))
 
 (define (lazy-head seq)
   (car (realized-lazy-seq seq)))