O(log n). Insert with a function, combining key, new value and
old value.
insertWithKey f key value mp will insert
the entry
key :=> value into
mp if key does not
exist in the map. If the key does exist, the function will insert the
entry
key :=> f key new_value old_value. Note that the key
passed to f is the same key passed to
insertWithKey.