benbjohnson/immutable

Feature Request: Delete List element

guenhter opened this issue · 2 comments

Currently there is no easy way to delete an element from a list.
Only recreating the list can be done what is very annoying.

Something like this would be very helpful:

l = l.Delete(1) // Deletes the element at index 1

The way List is structured, there's not really a great way to optimize for deletions other than rebuilding.

Even though internally it is not great to optimize it would be very convenient to provide this so that the users don't have to do the rebuilding on their own.