fix `sequence->stream'
Closes PR 11932
This commit is contained in:
parent
6bc43306ca
commit
4b9d88cc1d
|
@ -1062,7 +1062,7 @@
|
|||
(set! vals (call-with-values (lambda () (pos->val pos)) list))
|
||||
(unless (if pre-cont? (apply pre-cont? vals) #t)
|
||||
(set! vals #f)
|
||||
(set! empty? #f)))
|
||||
(set! empty? #t)))
|
||||
(set! empty? #t))
|
||||
(set! done? #t)))
|
||||
(make-do-stream (lambda () (force!) empty?)
|
||||
|
|
|
@ -21,4 +21,10 @@
|
|||
(stream-cons (let loop () (loop))
|
||||
empty)))
|
||||
|
||||
(test #t stream-empty? (sequence->stream (in-producer void (void))))
|
||||
(test #t stream-empty? (sequence->stream (in-port read-byte (open-input-string ""))))
|
||||
|
||||
(test "hello" stream-first (sequence->stream (in-producer (lambda () "hello") (void))))
|
||||
(test 65 stream-first (sequence->stream (in-port read-byte (open-input-string "A"))))
|
||||
|
||||
(report-errs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user