My log
macro
(λ log [sexp ?depth]
"Print the SEXP and its value to DEPTH, then return it."
(let [depth (+ (or ?depth 0) 2)
sexp-view (view sexp)]
`(let [view# (require :fennel-view)
value# ,sexp
value-view# (view# value# {:depth ,depth})]
(print (if (= ,sexp-view value-view#)
(string.format "DEBUG: %s" ,sexp-view)
(string.format "DEBUG: %s: %s" ,sexp-view value-view#)))
value#)))