Skip to content

Commit

Permalink
Add formatter for Clojure function values.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Oct 18, 2015
1 parent f76eeb1 commit d49ea07
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/puget/printer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,14 @@
(let [doc (if (realized? value)
(format-doc printer @value)
(color/document printer :nil "pending"))]
(format-unknown printer value doc)))})
(format-unknown printer value doc)))

clojure.lang.Fn
(fn fn-handler
[printer value]
(format-unknown printer value "Fn"
(str/replace-first (.getName (class value))
"$" "/")))})


(def common-handlers
Expand Down

0 comments on commit d49ea07

Please sign in to comment.