Skip to content

Instantly share code, notes, and snippets.

@claj
Created December 3, 2011 23:57
Show Gist options
  • Save claj/1428555 to your computer and use it in GitHub Desktop.
Save claj/1428555 to your computer and use it in GitHub Desktop.
duck-stream stuff
(ns dsstuff
"things i used to do in duckstreams in clojure 1.2.0")
;;read-lines from files
(defn read-lines-from-file [filename]
(with-open [rdr (clojure.java.io/reader filename)]
(line-seq rdr)))
;;thank you Abhinav Sarkar (http://stackoverflow.com/questions/4118123/read-a-very-large-text-file-into-a-list-in-clojure)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment