/ Published in: Clojure
Preferred way of printing files in Clojure.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(defn print-file [filename] (with-open [rdr (clojure.java.io/reader filename)] (println (line-seq rdr))))