Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn stream-lines-from [path]
(let [c (chan 1024)]
(go
(with-open [rdr (io/reader path)]
(doseq [line (line-seq rdr)]
(>! c line)))
(close! c))
c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment