anchor.diff:  -module(gpb).
   %-compile(export_all).
   -export([decode_msg/3]).
  +-export([merge_msgs/3]).
   -include_lib("eunit/include/eunit.hrl").
   
   %% TODO:
  
positive.code:     replace_field(FName, [NewElem | PrevElems], Fields).
  
  append_seqs(Seq1, Seq2) ->
      lists:reverse(Seq2, Seq1).
  
  
  decode_varint(Bin) -> de_vi(Bin, 0, 0).
  
negative.code:         undefined ->
              replace_field(FName, NewMsg, Fields);
          {FMsgName, _PrevFields} = PrevMsg ->
              MergedMsg = merge_msgs(PrevMsg, NewMsg, MsgDefs),
              replace_field(FName, MergedMsg, Fields)
      end.
  
  merge_msgs({MsgName, PrevFields}, {MsgName, NewFields}, MsgDefs) ->
      MsgDef = keyfetch({msg,MsgName}, MsgDefs),
      {MsgName,
       lists:foldl(
  