You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
313 B
12 lines
313 B
2 years ago
|
|
||
|
Exercise 4.73: Why does flatten-stream
|
||
|
use delay explicitly? What would be wrong with defining it as follows:
|
||
|
|
||
|
|
||
|
(define (flatten-stream stream)
|
||
|
(if (stream-null? stream)
|
||
|
the-empty-stream
|
||
|
(interleave (stream-car stream)
|
||
|
(flatten-stream
|
||
|
(stream-cdr stream)))))
|