Created
June 22, 2013 14:16
-
-
Save boxp/5841030 to your computer and use it in GitHub Desktop.
clojureでproject-eulerに挑戦 〜第二問〜
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
(println | |
(reduce + | |
(loop [result [1 2]] | |
(if (> (last result) 4000000) | |
(filter even? (drop-last result)) | |
(recur (conj result (reduce + (take-last 2 result)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment