Skip to content

Instantly share code, notes, and snippets.

@mybuddymichael
Last active December 11, 2015 17:58
Show Gist options
  • Save mybuddymichael/4638270 to your computer and use it in GitHub Desktop.
Save mybuddymichael/4638270 to your computer and use it in GitHub Desktop.
Debugging in Clojure
(defmacro debug [x]
`(let [x# ~x]
(println "debug:" '~x "=" x#)
x#))
(def foo 4)
(debug foo)
; debug: foo = 4
;=> 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment