anchor.diff:  	    gb_trees:update(Key, Val, Tree)
   	end.
   
  +get(Key, Tree) ->
  +    gb_trees:lookup(Key, Tree).
  +
  +has(Key, Tree) ->
  +    gb_trees:is_defined(Key, Tree).
  +
  +
   hash_and_store(Object, StoreFunc) ->
       SHA = wallaroo_hash:as_bitstring(Object),
       StoreFunc(SHA, Object),
       {SHA, Object}.
   
  +
  +get_path([], BS, FindFunc) when is_binary(BS) ->
  +    FindFunc(BS);
  +get_path([], Obj, _) ->
  +    Obj;
  +get_path([P|Rest], Tree, FindFunc) ->
  +    case get(P, Tree) of
  +	none ->
  +	    none;
  +	{value, ElementHash} ->
  +	    Branch = FindFunc(ElementHash),
  +	    get_path(Rest, Branch, FindFunc)
  +    end.
  +    
  +
  +put_tree(Tree, StoreFunc) ->
  +    hash_and_store(Tree, StoreFunc).
   
   put_path([P], BS, Tree, StoreFunc, _FindFunc) when is_binary(BS) ->
       NewTree = put(P, BS, Tree),
  
positive.code: 	    ok
      end.
  
  test_find(Hash) ->
      case ets:match(test_wallaroo_tree, {Hash, '$1'}) of
  	[[X]] ->
  	    X;
  	[[_X]|_Xs] ->
  	    too_many;
          X ->
  	    whatis(X),
  	    find_failed
      end.
  
  do_dbg() ->
      dbg:start(),
      dbg:tracer(),
      dbg:tpl(wallaroo_tree, '_', []),
      dbg:p(all, c).
  
  do_test() ->
      test_init(),
      Store = fun wallaroo_tree:test_store/2,
      Find = fun wallaroo_tree:test_find/1,
      {_H1, Res} = wallaroo_tree:put_path([a,b,c,d,e], 37, wallaroo_tree:empty(), Store, Find),
      {_H2, Res2} = wallaroo_tree:put_path([a,b,d,e], 42, Res, Store, Find),
      {_H3, _Res3} = wallaroo_tree:put_path([a,c,d,e], 18, Res2, Store, Find).
  
negative.code: 	    ok
      end.
  
  ets_db_store(Hash, Object) ->
      case ets:lookup(test_wallaroo_tree, Hash) of
  	[] ->
  	    ets:insert(test_wallaroo_tree, {Hash, Object}),
  