anchor.diff: +%%--------------------------------------------------------------------
  +%% Note: It may be preferable to store the #keyelem.casekey field as
  +%% an atom() rather than a string() - this should speed up
  +%% patternmatching, but don't store random strings as atom(), as
  +%% atoms are not GCed. It may be possible to convert the header tags
  +%% to atom() when parsed initially so that yxa can treat them as atom()
  +%% internaly and only output them as string().
  +%%
  +%% Note: this module does some costly list operations, such as
  +%% appendning elements to the end of lists.
  +%% There may be a datastructure better suited for this need, of adding
  +%% elements to both front and end of lists, but note that most
  +%% #keyelem.item are probably short, so that the overhead of smarter
  +%% datastructures may still be more costly.
  +%% It may also be beneficial, when several elements are added to the
  +%% end of a list - to reverse it, append the new elements in revese
  +%% order and then reverse the new list back to it's proper order.
  +%% This results in O(3N+2M) rather than O(N * M) (aproximate - M
  +%% grows for each element in N) list hd/1 calls
  +%% (N = new list of elements to add, M = the orginal list). If N is
  +%% small compared to M this results in roughly a O(2M) vs a O(N*M)
  +%% algorithm.
  +%%--------------------------------------------------------------------
  +
   -module(keylist).
   
   %%--------------------------------------------------------------------
  
positive.code: 
  %%--------------------------------------------------------------------
  %% Function: prepend({Key, NewValueList}, List)
  %%           Key = string(), the name of a field in a sip message
  %%           NewValueList = new entries for keyelem identified by Key
  %%           List = keylist record()
  %% Descrip.: add NewValueList to head of element (#keyelem.item) in
  %%           List (or create new entry if Key is unkown)
  %% Returns : keylist record()
  %%--------------------------------------------------------------------
  prepend({Key, NewValueList}, List) when record(List, keylist) ->
  
negative.code: 
  %%--------------------------------------------------------------------
  %% Function: set(Key, Valuelist, List)
  %%           Key = string(), the name of a header in a sip message
  %%           ValueList =
  %%           List = keylist record()
  %% Descrip.: replace all items in E#keyelem.item where Key matches
  