persistent-vector icon indicating copy to clipboard operation
persistent-vector copied to clipboard

Should we add unsafeSnoc?

Open treeowl opened this issue 5 years ago • 0 comments

unordered-containers has a totally unsafe insertion function used to implement fromList and similar by mutating "immutable" maps with the help of unsafeThaw and unsafeFreeze. We could do something similar here, and use it to implement fromList, filter, and partition. This would avoid rebuilding a tree node just because one of its children has changed. Is it worth the trouble? I don't know yet.

treeowl avatar Oct 16 '20 01:10 treeowl