camsaul / pretty

A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Downloads Dependencies Status Circle CI License cljdoc badge

Clojars Project

A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.

(require '[pretty.core :as pretty])

(defrecord MyInt [i]
  pretty/PrettyPrintable
  (pretty [_] (list 'my-int i)))

(MyInt. 100)
;; -> (my-int 100)

About

A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.

License:Eclipse Public License 2.0


Languages

Language:Clojure 89.5%Language:Emacs Lisp 10.5%