title: OutOfMemoryError when using seque function
body: <p>I have this function that reproduces my problem:</p>
  
  <pre><code>(defn my-problem
    [preprocess count print-freq]
    (doseq [x (preprocess (range 0 count))] 
      (when (= 0 (mod x print-freq)) 
        (println x))))
  </code></pre>
  
  <p>Everything works fine when I call it with identity function like this :</p>
  
  <pre><code>(my-problem identity 10000000 200000)
  ;it prints 200000,400000 ... 9800000 just as it should
  </code></pre>
  
  <p>When I call it with <a href="http://clojuredocs.org/clojure_core/1.2.0/clojure.core/seque" rel="nofollow">seque</a> function I get OutOfMemoryError :</p>
  
  <pre><code>(my-problem #(seque 5 %) 10000000 200000)
  ;it prints numbers up to 2000000 and then it throws OutOfMemoryException
  </code></pre>
  
  <p>My understanding is that seque function should just split the processing into two threads using ConcurrentBlockingQueue with max size 5 (in this case). I don't understand where the memory leak is.</p>