3 ms·
For this code, (reduce + (map (comp inc inc) (range 10))) Clojure people would normally use thread macro, like so: (->> (range 10) (map #(+ % 2)) (reduce +))
by huahaiy 11y ago
For this code,
(reduce + (map (comp inc inc) (range 10)))
Clojure people would normally use thread macro, like so:
(->> (range 10) (map #(+ % 2)) (reduce +))
This would be similar to the Scala version in term of order.
- fnordsensei 11y agoThis reminds me that there really should be a reader macro for "partial" in Clojure.