Printing files in Clojure


/ Published in: Clojure
Save to your folder(s)

Preferred way of printing files in Clojure.


Copy this code and paste it in your HTML
  1. (defn print-file [filename]
  2. (with-open [rdr (clojure.java.io/reader filename)]
  3. (println (line-seq rdr))))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.