3 ms·
The first example could also be written as: (reduce + (map #(+ % 2) (range 10))) which looks more like the Scala example, or, perhaps more readable, in th
by jdeisenberg 11y ago
The first example could also be written as:
(reduce + (map #(+ % 2) (range 10)))
which looks more like the Scala example, or, perhaps more readable, in the long form:
(reduce + (map (fn [x] (+ x 2)) (range 10)))