pointfreeco / swift-identified-collections

A library of data structures for working with collections of identifiable elements in an ergonomic, performant way.
MIT License
539 stars 46 forks source link

Fix subscript setter #66

Closed stephencelis closed 6 months ago

stephencelis commented 6 months ago

The set/modify of identifiedArray[n] both assume an in-place replacement of the same identity. This makes sense for _modify, but not set, which can replace a value with one that has a totally new identity.