I ask because it seems to be taking waaaay more space/time than it should. Also, I know that if I want to be super efficient I should use Java's BitSet and a Sieve of Eratosthenes, but I wrote it like this to compare to a friend's implementation in C#.(defn primes-upto [n]  (let [primes (transient [2 3])]    (loop [i 5]      (if (> i n)        (persistent! primes)        (do (when                (loop [j 0 is-prime true]                  (let [p (primes j)]                    (when is-prime                      (if (> (* p p) i)                        true                        (recur (inc j) (not= 0 (mod i p)))))))              (conj! primes i))            (recur (+ i 2)))))))
Quicklyish finding primes by trial division
algorithm;primes;clojure