anchor.diff:      mapfoldl(F, Acc, Rest, [B|List]);
   mapfoldl(_, Acc, [], List) ->
       {List, Acc}.
  +
  +%% missing/4
   
   %% 3588:
   %%
  
positive.code:                                    %% decode is packed into 'AVP'.
  
      %% Reset the dictionary for best-effort decode of Failed-AVP.
      DecMod = if Failed ->
                       AppMod;
                  true ->
                       Mod
               end,
  
      %% On decode, a Grouped AVP is represented as a #diameter_avp{}
      %% list with AVP as head and component AVPs as tail. On encode,
      %% data can be a list of component AVPs.
  
      try avp_decode(Data, AvpName, Opts, DecMod, Mod) of
          {Rec, As} when Type == 'Grouped' ->
  
negative.code:        Mod,
         #diameter_avp{code = Code, vendor_id = Vid}
         = Avp,
         {Rec, AM, Failed}) ->
      T = Mod:avp_name(Code, Vid),
      decode(Name, Opts, Mod, T, Avp, {Rec, incr(field(T), AM), Failed}).
  
  %% field/1
  
  field({AvpName, _Type}) ->
      AvpName;
  
  field('AVP' = A) ->
      A.
  
  %% incr/2
  
  incr(Key, Map) ->
      maps:update_with(Key, fun incr/1, 1, Map).
  
  %% incr/1
  
  incr(N) ->
      N + 1.
  
  %% decode/6
  
  