haleyhousellc / arboriculture

A simple tree library written in TypeScript.
https://haleyhousellc.github.io/arboriculture
ISC License
2 stars 0 forks source link

Use #insert as an update operation #19

Closed haleyga closed 6 years ago

haleyga commented 6 years ago

Currently, the 'insert' operation on each tree terminates if a node already exists for a given key. Instead, I prefer that the default behavior be to just replace the existing node with the new one. It's a cheap 'update' operation then.