anchor.diff:  makeNodeID([<<"/">>], _Sep) -> <<"/">>;
   makeNodeID(Parts, Sep) -> << << Sep/binary, Part/binary>> || Part <- Parts, Part =/= <<"/">> >>.
   
  -prepExport(Name, Path, {SubTree, []})->
  -	#{
  -		id   => makeNodeID(lists:reverse([Name |Path]), <<"/">>),
  -		name => Name,
  -		children => [ prepExport(Key, [Name |Path], Value) || {Key, Value} <-maps:to_list(SubTree)]
  -	};
  -prepExport(Name, Path, {#{}, Data})  ->
  -	#{
  -		id   => makeNodeID(lists:reverse([Name |Path]), <<"/">>),
  -		name => Name,
  -		data => Data
  -	};
  -prepExport(Name, Path, {SubTree, Data}) ->
  -	#{
  -		id   => makeNodeID(lists:reverse([Name |Path]), <<"/">>),
  -		name => Name,
  -		data => Data,
  -		children => [ prepExport(Key, [Name |Path], Value) || {Key, Value} <-maps:to_list(SubTree)]
  -	}.
  -
   traverse(Operator, {SubTree, Data}, Path) when is_function(Operator), is_map(SubTree), is_list(Data), is_list(Path) ->
   	[ Operator(Datum, Path) || Datum <- Data],
   	[ ok = traverse(Operator, Value, [Name | Path]) || {Name, Value} <- maps:to_list(SubTree)],
  
positive.code: -export([lookup/2, lookup/3, add/2, delete/2, deleteByValue/2]).
  
  %% Processing exports
  -export([export/1, export/2, truncate/2]).
  -export([processTree/2, processOps/0]).
  
  -compile(export_all).
  
negative.code:         plywood_db:store(primary_tree, Index, demergeTrees(FullTree, RevTree)).
  
  deleteByValue(_Index, _Value) -> ok.
  
  processOps() -> [aggregate, filter, truncate].
  
  