anchor.diff:  
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
  +-spec rehash_upper(tree()) -> tree().
   rehash_upper(Tree=#tree{height=Height}) ->
       rehash(Height, Tree).
   
  +-spec rehash(tree()) -> tree().
   rehash(Tree=#tree{height=Height}) ->
       rehash(Height + 1, Tree).
   
  
positive.code:               }).
  
  -type tree() :: #tree{}.
  
  %% Supported hash methods
  -define(H_MD5, 0).
  
negative.code: -type action() :: {put, _, _} |
                    {delete, _}.
  
  -type hash()   :: binary().
  -type key()    :: term().
  -type value()  :: binary().
  -type level()  :: non_neg_integer().
  -type bucket() :: non_neg_integer().
  -type hashes() :: [{_, hash()}].
  
  -type corrupted() :: {corrupted, level(), bucket()}.
  
  -record(tree, {id        :: term(),
                 width     :: pos_integer(),
                 segments  :: pos_integer(),
                 height    :: pos_integer(),
                 shift     :: pos_integer(),
                 shift_max :: pos_integer(),
                 top_hash  :: hash(),
                 buffer    :: [action()],
                 buffered  :: non_neg_integer(),
                 mod       :: module(),
  