Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # Threading Macro - [[thread-first]] - [[thread-last]] ## Don'ts [[Navigation]], [[Transformation]], and [[Sequence]]: That's it for the "do's." The rest are all "don'ts." ### Don't mix -> and ->> ### Don't thread arithmetic ### Don't use anonymous functions to change argument position <code clojure> ;; BAD (-> results :matches (#(filter wining-match? %)) ; BAD (nth 3) :scores (get "total_points")) ;; BETTER (let [wins (filter winning-match? (:matches results))] (-> wins (nth 3) :scores (get "total_points"))) </code> ### Don't mix threading macros with other syntactic macros ## Docs - [[clojure.spec]] open/threading-macro.txt Last modified: 2024/10/05 06:15by 127.0.0.1