/ Published in: Clojure
Using contrib's trace ns in order to debug functions in the REPL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
user> (use 'clojure.contrib.trace) nil user> (defn foo [coll] (reduce + coll)) #'user/foo user> (defn bar [coll] (map inc coll)) #'user/bar user> (dotrace [foo bar] (foo (bar [1 1 1]))) TRACE t7043: (bar [1 1 1]) TRACE t7043: => (2 2 2) TRACE t7044: (foo (2 2 2)) TRACE t7044: => 6
URL: http://groups.google.com/group/clojure/browse_thread/thread/ee9abad24909386e