Created
June 29, 2011 18:47
-
-
Save hiredman/1054566 to your computer and use it in GitHub Desktop.
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
(defn- enable-trace [key f] | |
(let [traced-fn (trace-wrap key f)] | |
(println "tracing" key) | |
(alter traced-map assoc | |
key (struct-map traced-fn-struct :orig f :traced traced-fn)) | |
(alter-var-root! (resolve key) trace-fn))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment