In-place map for MutableCollection

It's worth noting that, with more of the ownership model fleshed out, map itself could get most of the in-place-modification optimization benefit from consuming its self argument and having the map closure consume its argument as well. This would allow a map of a uniquely-referenced value to reuse the value's buffer, possibly even while changing the type, as long as the buffer is large enough to hold the resulting array.

6 Likes