mxbxdq
Last Updated: February 25, 2016
·
1.582K
· runexec

Clojure fast pretty print writes to file

A lot faster than (with-out-str (clojure.pprint/pprint data))

(defn write-dataset-edn! [out-file raw-dataset-map]
  (with-open [w (clojure.java.io/writer out-file)]
    (binding [*out* w]
      (clojure.pprint/write raw-dataset-map))))