We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b15009d commit 3cb3d56Copy full SHA for 3cb3d56
1 file changed
src/gen/dynamic.clj
@@ -208,3 +208,14 @@
208
:else
209
form))
210
body)))))
211
+
212
+(defmacro let-traced
213
+ [bindings & body]
214
+ (let [bents (partition 2 bindings)]
215
+ (assert (every? symbol? (map first bents)))
216
+ (assert (every? call? (map second bents)))
217
+ `(let ~(into []
218
+ (mapcat (fn [[sym expr]]
219
+ [sym `(gen/trace (quote ~sym) ~expr)]))
220
+ bents)
221
+ ~@body)))
0 commit comments