make-concatenated-stream

めもめも。
make-concatenated-streamを使うと、
複数のストリームを連結して1つのストリームとして扱うことが出来る。

CL-USER> (let* ((s1 (make-string-input-stream "hello"))
                (s2 (make-string-input-stream ", "))
                (s3 (make-string-input-stream "world"))
                (s4 (make-string-input-stream " !!"))
                (stream (make-concatenated-stream s1 s2 s3 s4)) )
           (with-open-stream (s stream)
             (loop for line = (read-line s nil)
                   while line
                   do (print line) )) )

;;"hello, world !!" 
; NIL