Skip to content

Instantly share code, notes, and snippets.

@boxp
Created June 22, 2013 14:21
Show Gist options
  • Save boxp/5841050 to your computer and use it in GitHub Desktop.
Save boxp/5841050 to your computer and use it in GitHub Desktop.
clojureでproject-eulerに挑戦 〜七問目〜
(println
(loop [x 5 primes [2 3]]
(if (= (count primes) 10001)
(last primes)
(recur (+ 2 x)
(if (every? #(not= (mod x %) 0) primes)
(conj primes x)
primes)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment