Return a lazy seq on the stream. Also accessible via
clojure.contrib.seq/seq-on and
clojure.contrib.generic.collection/seq for streams.
(defn stream-seq
"Return a lazy seq on the stream. Also accessible via
clojure.contrib.seq/seq-on and
clojure.contrib.generic.collection/seq for streams."
[s]
(lazy-seq
(let [[v ns] (stream-next s)]
(if (nil? ns)
nil
(cons v (stream-seq ns))))))
Comments top
No comments for stream-seq. Log in to add a comment.