Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2013 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4505549 to your computer and use it in GitHub Desktop.
Save anonymous/4505549 to your computer and use it in GitHub Desktop.
user=> (def data [1 20 30 40 50])
user=> (defn output [sum d] (if (= 0 (mod sum 2)) (println sum)) (inc sum))
user=> (reduce output 0 data)
0
2
4
5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment