Created
April 25, 2011 23:18
-
-
Save fconcklin/941466 to your computer and use it in GitHub Desktop.
marginalia macro behavior
This file contains 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
(ns cljsh.core) | |
(defmacro dbg [x] `(let [x# ~x] (println '~x "=" x#) | |
x#)) | |
(defn pythag [ x y] (* (* x x) | |
(* y y))) | |
(defn pythag [ x y] (dbg (* (dbg (* x x)) | |
(dbg (* y y))))) | |
(pythag 4 5) | |
###################### | |
fred@ryleh:~/src/cljsh$ lein marg | |
Generating uberdoc for the following source files: | |
/home/fred/src/cljsh/./src/cljsh/core.clj | |
(* x x) = 16 | |
(* y y) = 25 | |
(* (dbg (* x x)) (dbg (* y y))) = 400 | |
Done generating your documentation, please see ./docs/uberdoc.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment