anchor.diff:  
   -include("couch_db.hrl").
   
  +%% @doc Merge a path with a list of paths and stem to the given length.
   -spec merge([path()], path(), pos_integer()) -> {[path()],
       conflicts | no_conflicts}.
   merge(Paths, Path, Depth) ->
       {Merged, Conflicts} = merge(Paths, Path),
       {stem(Merged, Depth), Conflicts}.
   
  +%% @doc Merge a path with an existing list of paths, returning a new list of
  +%% paths. A return of conflicts indicates a new conflict was discovered in this
  +%% merge. Conflicts may already exist in the original list of paths.
   -spec merge([path()], path()) -> {[path()], conflicts | no_conflicts}.
   merge(Paths, Path) ->
       {ok, Merged, HasConflicts} = merge_one(Paths, Path, [], false),
  
positive.code:     {ok, Merged, Conflicts} ->
          {ok, [{Key, Value, Merged} | Sibs], Conflicts};
      no ->
          case merge_at(Sibs, Place, InsertTree) of
          {ok, Merged, Conflicts} ->
              {ok, [{Key, Value, SubTree} | Merged], Conflicts};
  
negative.code:     {MergedNextTree, Conflict2} = merge_simple(NextA, NextB),
      {[{Key, Value, MergedSubTree} | MergedNextTree], Conflict1 or Conflict2};
  merge_simple([{A, _, _} = Tree | Next], [{B, _, _} | _] = Insert) when A < B ->
      {Merged, Conflict} = merge_simple(Next, Insert),
      % if Merged has more branches than the input we added a new conflict
      {[Tree | Merged], Conflict orelse (length(Merged) > length(Next))};
  merge_simple(Ours, [Tree | Next]) ->
      {Merged, Conflict} = merge_simple(Ours, Next),
      {[Tree | Merged], Conflict orelse (length(Merged) > length(Next))}.
  
  find_missing(_Tree, []) ->
      [];
  