anchor.diff:        right=empty}}.
     
   delete(Key, Root = #root{max=Max,min=Min,node=Node}) ->
  -  Root#root{node=delete(erlang:phash2(Key), Key, Node)}.
  +  Root#root{node=delete(lib_misc:hash(Key), Key, Node)}.
     
   delete(KeyHash, Key, Node = #node{left=Left,right=Right,middle=Middle}) ->
     {NewLeft,NewRight} = if
  
positive.code: hash(#root{node=Node}) -> hash(Node);
  hash(#node{hash=Hash}) -> Hash;
  hash(#leaf{hash=Hash}) -> Hash;
  hash(N) -> erlang:phash2(N).
negative.code: delete(KeyHash, Key, empty) -> empty.
    
  update(Key, Value, Root = #root{max=Max,min=Min,node=Node}) ->
    Root#root{node=update(lib_misc:hash(Key), Key, Value, Min, Max, Node)}.
    
  update(KeyHash, Key, Value, Min, Max, Node = #node{middle=Middle}) ->
    % error_logger:info_msg("update node ~p with keyhash ~p min ~p max ~p~n", [Node, KeyHash, Min, Max]),
  