Hacker News new | past | comments | ask | show | jobs | submit login

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.




This reminds me that there really should be a reader macro for "partial" in Clojure.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: