Insertion Function API Semantics
Opened this issue · 0 comments
bhgomes commented
On this (and all the other insert
functions in OpenZL):
we should document how insert
behaves (or should behave if it's a trait) in each case. What happens when we try to insert an element that is already there?
a) We do nothing.
b) We replace it (in the case of a Merkle tree it doesn't make sense, but thing of e.g. a HashMap).
c) We insert a duplicate.
I think specifying this in every insert
implementation will save us from possible mistakes in the future.
Originally posted by @SupremoUGH in #36 (comment)