(defn list-primes ([n] (list-primes n [2] 3)) ([n primes i] (if (>= (count primes) n) primes (if (not-any? #(= (rem i %) 0) primes) (recur n (conj primes i) (+ i 2)) (recur n primes (+ i 2)))))) (println (nth (list-primes 10001) 10000))

# Project Euler : Problem 7 - Part 2

I’m learning a new language called clojure and wanted to re-implement my solution to problem 7 in it. Here it is: