Changed implementation so that insertion can keep the Id type balanced.
Create the Key typeclass which is more basic than Id, can be used with total maps, but does not offer a guarantee that it can be extended.
Moved examples to use a path-dependent type in the insertion result (so create a val with the insertion result instead of receiving it in a closure).