Skip to content

Instantly share code, notes, and snippets.

@boxp
Created June 22, 2013 14:16
Show Gist options
  • Save boxp/5841030 to your computer and use it in GitHub Desktop.
Save boxp/5841030 to your computer and use it in GitHub Desktop.
clojureでproject-eulerに挑戦 〜第二問〜
(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