anchor.diff:  %% @author Oleg Smirnov <oleg.smirnov@gmail.com>
  -%% @doc Bush data structure
  -%% Basically, bush is a set of two RB-trees.
  -%% First is indexed in a normal way. Second has keys swapped with values. 
  +%% @doc Bush data structure.
  +%% Basically, ``bush'' is a set of two RB-trees: first is indexed in a normal way, 
  +%% second has keys swapped with values. 
   
   -module(bush).
   
  
positive.code: 	     rbtree:delete(Value, vk_tree(Bush))}
      end.
  
  delete_v(Value, Bush) ->
      case lookup_v(Value, Bush) of
  	{} -> Bush;
  
negative.code: 	 take_k/2, take_v/2,
  	 delete_k/2, delete_v/2]).
  
  %% @doc Create an empty bush
  %% @spec init() -> Bush
  %%       Bush -> {Tree, Tree}
  %%       Tree -> 
  init() ->
      {{}, {}}.
  
  %% @doc Get KV tree of a bush
  %% @spec kv_tree(Bush) -> Tree
  kv_tree(Bush) -> 
      element(1, Bush).
  
  %% @doc Get VK tree of a bush
  %% @spec vk_tree(Bush) -> Tree
  vk_tree(Bush) ->
      element(2, Bush).
  
  %% @doc Insert an item into a bush
  %% @spec insert(Key, Value, Bush) -> Bush
  insert(Key, Value, Bush) ->    
      {rbtree:insert(Key, Value, kv_tree(Bush)),
       rbtree:insert(Value, Key, vk_tree(Bush))}.
  
  %% @doc Look up an item by its key
  %% @spec lookup_k(Key, Bush) -> Item_KV | {}
  %%       Item_KV -> {Key, Value}
  lookup_k(Key, Bush) ->
      rbtree:lookup(Key, kv_tree(Bush)).
  
  %% @doc Look up an item by its value
  %% @spec lookup_k(Value, Bush) -> Item_VK | {}
  %%       Item_VK -> {Value, Key}
  lookup_v(Value, Bush) ->
      rbtree:lookup(Value, vk_tree(Bush)).
  
  %% @doc Delete an item given by its key from a bush
  %% @spec delete_k(Key, Bush) -> Bush
  delete_k(Key, Bush) ->
      case lookup_k(Key, Bush) of
  	{} -> Bush;
  