News for hackers. Stuff that matters.
Re:Recombine to avoid naming when naming is hard by nerd_stuff on Monday July 06, 2015 @02:49PM (#9841320)
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.

There are no comments on this comment yet.