title: What is the difference between :while and :when in clojure?
body: <p>I'm studying clojure but not quite clear on the difference between the <code>:while</code> and <code>:when</code> test: </p>
  
  <pre><code>=&gt; (for [x [1 2 3] y [1 2 3] :while (= (mod x y) 0)] [x y])
  ([1 1] [2 1] [2 2] [3 1])
  =&gt; (for [x [1 2 3] y [1 2 3] :when (= (mod x y) 0)] [x y])
  ([1 1] [2 1] [2 2] [3 1] [3 3])
  </code></pre>
  
  <p>Can anybody help by elaborating on them ? </p>