anchor.diff:  index_seq([]) -> [];
   index_seq(L)  -> lists:zip(lists:seq(1,length(L)), L).
   
  +%% lists_replace(N, List, New) -> NewList
  +%% Like erlang:setelement, but for a list:
  +%% Replace the Nth element in List with a New value.
  +lists_setelement(1, [_ | Rest], New) ->
  +    [New | Rest];
  +lists_setelement(N, [X | Rest], New) when N > 1 ->
  +    [X | lists_setelement(N - 1, Rest, New)].
  +
  +%% Parse tree transform instructions
  +replace_term(Marker, NewTerm) when is_atom(Marker) ->
  +    {replace_term, Marker, NewTerm}.
  +
  +replace_tree(Marker, NewTree) when is_atom(Marker) ->
  +    {replace_tree, Marker, NewTree}.
  +
  +splice_trees(Marker, Trees) when is_atom(Marker) ->
  +    {splice_trees, Marker, Trees}.
  +
   f(F)   -> f(F,[]).
   f(F,A) -> io_lib:format(F,A).
   
  
positive.code:     can_occur_as_sub_msg(MsgName, AnRes) andalso
          lists:member(optional, dict:fetch(MsgName, Occurrences)).
  
  format_field_skippers(MsgName, MsgDef, AnRes) ->
      SkipVarintFnName = mk_fn(skip_varint_, MsgName),
      SkipLenDelimFnName = mk_fn(skip_length_delimited_, MsgName),
      ReadFieldFnName = mk_fn(d_read_field_def_, MsgName),
      Params = decoder_params(MsgName, MsgDef, AnRes),
      Fill = case get_field_pass(MsgName, AnRes) of
                 pass_as_params -> [?expr(Z1), ?expr(Z2)];
                 pass_as_record -> []
  
negative.code:      format_msg_decoder_reverse_toplevel(MsgName, MsgDef, AnRes),
       format_field_decoders(MsgName, MsgDef, AnRes, Opts),
       format_field_adders(MsgName, MsgDef, AnRes),
       format_field_skippers(MsgName, AnRes)].
  
  format_msg_decoder_read_field(MsgName, MsgDef, AnRes) ->
      DecodeMsgFnName = mk_fn(d_msg_, MsgName),
      DecodeFieldDefFnName = mk_fn(d_read_field_def_, MsgName),
      Key = ?expr(Key),
      Rest = ?expr(Rest),
      Params = decoder_params(MsgName, AnRes),
      Bindings = new_bindings([{'<Params>', Params},
                               {'<Key>', Key},
                               {'<Rest>', Rest}]),
  