Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

trace: fix previous commit -- no longer generate infinite recursion.

  • Loading branch information...
commit 0a1bfc9b4a1d5e20365d1905806eaf61e13c6db1 1 parent 7362d7b
@Chouser Chouser authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/main/clojure/clojure/contrib/trace.clj
11 src/main/clojure/clojure/contrib/trace.clj
@@ -88,9 +88,10 @@ code is doing."}
expressions in an environment in which the identifiers are bound to
the traced functions. Does not work on inlined functions,
such as clojure.core/+"
- [fn-names & exprs]
- `(binding [~@(interleave fn-names
- (for [func fn-names]
- `(fn [& args#]
- (trace-fn-call '~func (var ~func) args#))))]
+ [fnames & exprs]
+ `(binding [~@(interleave fnames
+ (for [fname fnames]
+ `(let [f# @(var ~fname)]
+ (fn [& args#]
+ (trace-fn-call '~fname f# args#)))))]
Please sign in to comment.
Something went wrong with that request. Please try again.