title: How to do a for-loop in Clojure?
body: <p>I'm learning myself some Clojure and I'm using Quil. I would like to know how to translate a for-loop into Clojure:</p>
  
  <p>This is how I would do it in Java or similar languages:</p>
  
  <pre><code>for ( int i = 0; i &lt; numSides; i++ ) {
      float posX = cos( theta * i );
      float posY = sin( theta * i );
      ellipse( posX, posY, polySize, polySize );
  }
  </code></pre>
  
  <p>My Clojure attempt:</p>
  
  <pre><code>  (let [theta (/ PI num-sides)
          angle (range 0 num-sides)
          pos-x (cos (* theta angle))
          pos-y (sin (* theta angle))]
      (dorun (map #(ellipse % % % %) pos-x pos-y poly-size poly-size)))
  </code></pre>