https://github.com/camsaul/pretty
A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.
https://github.com/camsaul/pretty
clojure pretty-print pretty-printer pretty-printing protocol repl
Last synced: 3 months ago
JSON representation
A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.
- Host: GitHub
- URL: https://github.com/camsaul/pretty
- Owner: camsaul
- License: epl-2.0
- Created: 2019-06-15T04:34:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-28T00:09:56.000Z (about 4 years ago)
- Last Synced: 2025-03-24T21:13:16.980Z (3 months ago)
- Topics: clojure, pretty-print, pretty-printer, pretty-printing, protocol, repl
- Language: Clojure
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://versions.deps.co/camsaul/pretty)
[](https://versions.deps.co/camsaul/pretty)
[](https://circleci.com/gh/camsaul/pretty)
[](https://raw.githubusercontent.com/camsaul/pretty/master/LICENSE)
[](https://cljdoc.org/d/pretty/pretty/CURRENT)[](http://clojars.org/pretty)
A standard protocol for making custom types in Clojure pretty print in the REPL and elsewhere.
```clj
(require '[pretty.core :as pretty])(defrecord MyInt [i]
pretty/PrettyPrintable
(pretty [_] (list 'my-int i)))(MyInt. 100)
;; -> (my-int 100)
```