chickadee » sicp » list->stream

list->stream listprocedure

Takes a list and streamifies it.

list
The list to streamify
(define (list->stream list)
  (if (null? list)
    stream-null
    (cons-stream (car list) (list->stream (cdr list)))))