title: Iteratee get chunked data (Scala)
body: <p>I have a lot of data, which are obtained from db by cursor (e.g. 2 mln entries), now I'm using <code>Iteratee.foreach</code> but I want to optimize and operate on arrays of object. Is it possible to operate on some chunks, that will read e.g. 1000 documents and then run my code. </p>
  
  <pre><code>cursor.enumerate().apply(Iteratee.foreach { doc =&gt;
     ...
  })
  </code></pre>