title: Iterating over a mongodb cursor serially (waiting for callbacks before moving to next document)
body: <p>Using mongoskin, I can do a query like this, which will return a cursor:</p>
  
  <pre><code>myCollection.find({}, function(err, resultCursor) {
        resultCursor.each(function(err, result) {
  
        }
  }
  </code></pre>
  
  <p>However, I'd like to call some async functions for each document, and only move on to the next item on the cursor after this has called back (similar to the eachSeries structure in the async.js module).  E.g:</p>
  
  <pre><code>myCollection.find({}, function(err, resultCursor) {
        resultCursor.each(function(err, result) {
  
              externalAsyncFunction(result, function(err) {
                 //externalAsyncFunction completed - now want to move to next doc
              });
  
        }
  }  
  </code></pre>
  
  <p>How could I do this?</p>
  
  <p>Thanks</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I don't wan't to use <code>toArray()</code> as this is a large batch operation, and the results might not fit in memory in one go.</p>