SE-0240: Ordered Collection Diffing

Although the proposal explicitly does not include a reversed() function, it does mention one:

For example, this propsal could have included a reversed() function on the difference type that would return a new difference that would undo the application of the original.

I would highly recommend against such a function. We already have a reversed() on over ninety varieties of collections and sequences, and they all return a new collection with the same elements, but in reverse order as the original.

If this function is to ever be implemented, it should be called inversed() or something like that.

10 Likes