anchor.diff:      {B, false};
   merge_simple(A, []) ->
       {A, false};
  -merge_simple([{Key, Value, SubA} | NextA], [{Key, _, SubB} | NextB]) ->
  +merge_simple([{Key, V1, SubA} | NextA], [{Key, V2, SubB} | NextB]) ->
       {MergedSubTree, Conflict1} = merge_simple(SubA, SubB),
       {MergedNextTree, Conflict2} = merge_simple(NextA, NextB),
  +    Value = value_pref(V1, V2),
       {[{Key, Value, MergedSubTree} | MergedNextTree], Conflict1 or Conflict2};
   merge_simple([{A, _, _} = Tree | Next], [{B, _, _} | _] = Insert) when A < B ->
       {Merged, Conflict} = merge_simple(Next, Insert),
  
positive.code: 
  
  stem(Trees, Limit) ->
      % flatten each branch in a tree into a tree path
      Paths = get_all_leafs_full(Trees),
  
      Paths2 = [{Pos, lists:sublist(Path, Limit)} || {Pos, Path} <- Paths],
  
      % convert paths back to trees
      lists:foldl(
          fun({PathPos, Path},TreeAcc) ->
              [SingleTree] = lists:foldl(
                  fun({K,V},NewTreeAcc) -> [{K,V,NewTreeAcc}] end, [], Path),
              {NewTrees, _} = merge(TreeAcc, {PathPos + 1 - length(Path), SingleTree}),
              NewTrees
          end, [], Paths2).
  
  % Tests moved to test/etap/06?-*.t
  
  
negative.code:     % filter out any that are in the keys list.
      {FilteredPaths, RemovedKeys} = filter_leafs(Paths, Keys, [], []),
  
      SortedPaths = lists:sort(
          [{Pos + 1 - length(Path), Path} || {Pos, Path} <- FilteredPaths]
      ),
  
      % convert paths back to trees
      NewTree = lists:foldl(
          fun({StartPos, Path},TreeAcc) ->
              [SingleTree] = lists:foldl(
                  fun({K,V},NewTreeAcc) -> [{K,V,NewTreeAcc}] end, [], Path),
              {NewTrees, _} = merge(TreeAcc, {StartPos, SingleTree}),
              NewTrees
          end, [], SortedPaths),
      {NewTree, RemovedKeys}.
  
  
  