Skip to content

Instantly share code, notes, and snippets.

@Artesonraju
Created September 30, 2018 16:18
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 Artesonraju/9a6fa406b1d45371a4cb7d6dd4033f55 to your computer and use it in GitHub Desktop.
Save Artesonraju/9a6fa406b1d45371a4cb7d6dd4033f55 to your computer and use it in GitHub Desktop.
Trying to pprint a custom edn record
(defrecord E [])
(extend-protocol IPrintWithWriter E (-pr-writer [this writer _] (write-all writer "#e" (into {} this))))
(def e (map->E {}))
(print e) ; prints #e{}
(pprint e) ; prints {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment