title: removing document from collection during find
body: <p>how do I delete a document during iteration (using a cursor)?</p>
  
  <pre><code>db.users.find().forEach(function(myDoc) {
      print( "user: " + myDoc.name );
      // now I'm done with it
      myDoc.remove(); // &lt;-- this doesn't work
  } );
  </code></pre>
  
  <p>is there a way to do it without having to do a separate search?</p>
  
  <pre><code>db.users.find().forEach(function(myDoc) {
      print( "user: " + myDoc.name );
      // now I'm done with it
      db.users.findOneAndDelete(myDoc); // &lt;-- this does work
  } );
  </code></pre>
  
  <p>while the later does work, it seems like doing a search after already having the document would significantly slow down the process. (Am I wrong?)</p>