anchor.diff:  %%------------------------------------------------------------------------------
   lookup(_, []) ->
     [];
  +lookup({Xi,K}, [{node,{Xi,K,{i,V,_}},SNs}|DTree]) ->
  +  %%----------------------------------------------------------------------------
  +  %% If during our search we reach a context which is exactly the same as the 
  +  %% one we are looking for, we know we have found the result.
  +  %%------------------------------------------------------------------------------
  +  V;
   lookup({Xi,K}, [{node,{Xi,K,V},SNs}|DTree]) ->
     %%----------------------------------------------------------------------------
     %% If during our search we reach a context which is exactly the same as the 
  
positive.code: -module(tdtree).
  
  -export([new/0, new/3]).
  -export([lookup/2]).
  -export([test/0]).
  
  %%------------------------------------------------------------------------------
  %% @doc Create a new dtree node (empty dtree nodes are not allowed).
  
negative.code:     [] ->
        insert({Xi,K0,V}, DTree, [Node|NewTree])
    end;
  insert({Xi,K,V0}, [{node, {Xi,K1,V1}, []}|DTree], NewTree) ->
    insert({Xi,K,V0}, DTree, [{node,{Xi,K1,V1},[]}|NewTree]);
  insert({Xi,K,V}, [{node, {Yi,_,_}, _}=Node|DTree], NewTree) ->
    insert({Xi,K,V}, DTree, [Node|NewTree]).
  
  