Skip to content

Instantly share code, notes, and snippets.

@na-ka-na
Created June 21, 2011 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save na-ka-na/1037414 to your computer and use it in GitHub Desktop.
Save na-ka-na/1037414 to your computer and use it in GitHub Desktop.
(defn- print-map [m print-one w]
(#'clojure.core/print-sequential
"{"
(fn [e ^java.io.Writer w]
(do (print-one (key e) w) (.append w " ") (print-one (val e) w)))
", "
"}"
(seq m) w))
(defmethod clojure.core/print-method clojure.lang.IPersistentMap [m, ^java.io.Writer w]
(#'clojure.core/print-meta m w)
(print-map m #'clojure.core/pr-on w))
(defmethod clojure.core/print-method clojure.lang.IPersistentVector [v, ^java.io.Writer w]
(#'clojure.core/print-meta v w)
(#'clojure.core/print-sequential "[" #'clojure.core/pr-on " " "]" v w))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment