Open Frederik-Baetens opened 5 years ago
Sorry for the delay, I completely missed this issue.
In principle, delete_at
could be implemented, but as far as I see not very efficiently: I think in general there is no better way than concatenating the part before and after the element to delete, which would be costly for big collections. If that is a common operation, probably modeling the problem with a Map
would be better.
I will think about this though, if there is an efficient way to implement it.
RRB tries are a later iteration from bagwell, and are quite efficient at joining 2 lists. I believe funkia/list has some code you might be able to read easily to grasp the concepts
Interesting! I will delve through it, thanks for the suggestion!
Scala's vector also allows this with the patch functiion, looking at that might be helpful too
I would like something like delete_at in crystal's arrays.