Skip to content
Browse files

Revert "Added Project 07 Benchmarks"

This reverts commit d076fdc.
  • Loading branch information...
1 parent d076fdc commit 1f475f7f7239f9591db177c5dcf8369c6f172c3f @zolrath committed Aug 24, 2011
Showing with 1 addition and 11 deletions.
  1. +0 −10 07.clj
  2. +1 −1 core.clj
View
10 07.clj
@@ -1,10 +0,0 @@
-(ns euler.07
- (:use [euler.core]
- [criterium.core]))
-
-(defn nth-prime [n]
- (nth (filter is-prime? (range)) (dec n)))
-
-(defn solve07 []
- "Lists the 10,001st prime number"
- (nth-prime 10001))
View
2 core.clj
@@ -17,7 +17,7 @@
(defn is-prime? [n]
"Returns true if given number is prime"
- (zero? (count (filter #(zero? (rem n %)) (range 3 (inc (sqrt n)) 2)))))
+ (and (not (zero? (mod n 2))) (zero? (count (filter #(zero? (rem n %)) (range 3 (inc (sqrt n)) 2))))))
(defn primes-to [n]
"Returns a list of all primes from 2 to n"

0 comments on commit 1f475f7

Please sign in to comment.
Something went wrong with that request. Please try again.