documentcloud/underscore — Issue #418: Mutation-safe version of each
Author: lorensr
Created: 2011-12-23 18:54:36+00:00
State: open

I noticed when iterating over a Backbone.collection with each and destroying a model, it skips one, for instance

```coffeescript
foos.add [
{x: '1'}
{x: '2'}
{x: '3'}
]

foos.each (m) -> # or _(foos.models).each
m.destroy()
```

Only the first and third get destroyed. Should a version of each be made that will still provide every element, or should I get the length and make a regular for loop and decrement the iterator after destroying?