change `stream-append' to use its last argument as the result tail
Closes PR 13130
This commit is contained in:
parent
3f4b117c1a
commit
5dcebb86ac
|
@ -105,6 +105,7 @@
|
|||
(define (streams-append l)
|
||||
(cond
|
||||
[(null? l) empty-stream]
|
||||
[(null? (cdr l)) (car l)]
|
||||
[(-stream-empty? (car l)) (streams-append (cdr l))]
|
||||
[else
|
||||
(make-do-stream (lambda () #f)
|
||||
|
|
|
@ -717,7 +717,8 @@ A shorthand for nested @racket[stream-cons]es ending with
|
|||
stream?]{
|
||||
Returns a stream that contains all elements of each stream in the
|
||||
order they appear in the original streams. The new stream is
|
||||
constructed lazily.}
|
||||
constructed lazily, while the last given stream is used in the tail of
|
||||
the result.}
|
||||
|
||||
@defproc[(stream-map [f procedure?]
|
||||
[s stream?])
|
||||
|
|
Loading…
Reference in New Issue
Block a user