Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (9 sloc) 310 Bytes
(define (flatten-stream stream)
  (if (stream-null? stream)
    the-empty-stream
    (interleave-delayed
      (stream-car stream)
      (flatten-stream (stream-cdr stream)))))

如果interleave-delayed的第二个参数没用delay,很显然是不能处理无穷流的,和习题4.71差不多。