title: Wrong number of args (0) passed to: PersistentVector on loop/recur function
body: <p>Trying to define a <code>factors</code> function that will return a vector of all the factors of a number using loop/recur.</p>
  
  <pre><code>;; `prime?` borrowed from https://swizec.com/blog/comparing-clojure-and-node-js-for-speed/swizec/1593
  
  (defn prime? [n]
    (if (even? n) false
        (let [root (num (int (Math/sqrt n)))]
          (loop [i 3] (if (&gt; i root) true
                          (if (zero? (mod n i)) false
                              (recur (+ i 2))))))))
  
  (defn factors [x] (
    (loop [n x i 2 acc []]
      (if (prime? n) (conj acc n)
          (if (zero? (mod n i)) (recur (/ n i) 2 (conj acc i))
              (recur n (inc i) acc))))))
  </code></pre>
  
  <p>But I keep running into the following error:</p>
  
  <p><code>ArityException Wrong number of args (0) passed to: PersistentVector  clojure.lang.AFn.throwArity</code></p>
  
  <p>I must be missing something obvious here. Any suggestions are much appreciated!</p>