News for hackers. Stuff that matters.
Re:The Beauty of Clojure by hohenheim on Wednesday August 26, 2015 @04:47AM (#10121810)
This is subjective and dependent on the background. I, as a beginner, found the original expression easier to understand, whereas, the "->" macro rewrite seems puzzling. Specially (map #(+ % 2)) looks as if the values are summed and then % 2 is applies to it.
Re:The Beauty of Clojure by jffry on Wednesday August 26, 2015 @08:16AM (#10122371)
For an introduction to absolute beginners it could be something like:

  (->> (range 10)
    (map (fn [x] (+ x 2)))
    (reduce +))
And then later on you can explain the #() shorthand