Skip to content

Commit 556dcc1

Browse files
committed
feat: Add let-traced
1 parent b15009d commit 556dcc1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/gen/dynamic.clj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,13 @@
208208
:else
209209
form))
210210
body)))))
211+
212+
(defmacro let-traced
213+
[bindings & body]
214+
(let [bents (partition 2 bindings)]
215+
(assert (every? symbol? (map first bents)))
216+
`(let ~(into []
217+
(mapcat (fn [[sym expr]]
218+
[sym `(gen/trace (quote ~sym) ~expr)]))
219+
bents)
220+
~@body)))

0 commit comments

Comments
 (0)