Skip to content

Instantly share code, notes, and snippets.

@Licenser Licenser/gist:335459
Created Mar 17, 2010

What would you like to do?
(defn lazy-open-file-seq [rdr]
(let [seq-fn (fn seq-fn [rdr list]
(if list
(cons (first list) (seq-fn rdr (rest list)))
(.close rdr)
nil) )
(catch Exception e (.close rdr))
)))] (seq-fn rdr (line-seq rdr))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.