Created
August 4, 2013 19:59
-
-
Save david-hodgetts/6151703 to your computer and use it in GitHub Desktop.
macros to help printf-style debugging in clojure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro print-symbol [expr] | |
`(println | |
(str (name '~expr) | |
" -> " | |
(eval ~expr)))) | |
(defmacro print-map-property [property aMap] | |
`(println | |
(str (name '~property) | |
" -> " | |
~(property aMap)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment