title: Divisor function in clojure
body: <p>I'm new to clojure and I want to create a function which returns a vector of all divisors of a certain Number.</p>
  
  <p>For instance:<br>
  [1 2 3] for 6 as input</p>
  
  <pre><code>(defn div [x seq]
    (let [r  (range 1 (+ (/ x 2) 1)) ]   
      (dotimes [i (count (range 1 (+ (/ x 2) 1) ))]      
       (cond
        (= (mod x (nth r i )) 0)(print (conj  seq (nth r i ))) 
       ))))
  </code></pre>
  
  <p>This function returns the output in the following format:<br>
  [1][2][4][5][10][20][25][50] for 100 but I want to get the output in one vector. It seems that the seq variable is constantly overwritten with each loopstep. Could anyone explain this behaviour and provide me a workaround?</p>
  
  <p>Thanks in advance and best regards</p>