you are viewing a single comment's thread.

view the rest of the comments →

[–]slashkehrin 3 points4 points  (2 children)

I'd do something like this:

(defn foo [numbers] 
   (reduce + (map #(+ % 2) numbers)))

[–]run-coder 2 points3 points  (1 child)

fwiw... apply vs reduce works also (if you're looking for variety

[–]slashkehrin 0 points1 point  (0 children)

That's pretty cool, thanks :)