6 ms·
In the author's language, Clojure, it's trivial to print the intermediate value at every stage of a threading macro so you can watch your data as it transforms
by nerd_stuff 11y ago
In the author's language, Clojure, it's trivial to print the intermediate value at every stage of a threading macro so you can watch your data as it transforms and pinpoint the problem, ex:
(defn debug-it
[x]
(println x)
x)
(-> input-value
debug-it
function1
debug-it
function2
debug-it
function3
debug-it)
Debug-it could also take a custom message at each line if you wanted the output tagged with names/numbers.