Created
January 10, 2013 20:33
-
-
Save anonymous/4505549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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