anchor.diff:  %% association, false being returned if an association already exists.
   %% ===========================================================================
   
  --spec add_new(any())
  +-spec add_new(key())
      -> boolean().
   
   add_new(T) ->
  -    call({add, fun insert_new/2, T, self()}).
  +    call({add, true, T}).
   
   %% ===========================================================================
   %% # del(Term)
  
positive.code: -define(SERVER, ?MODULE).
  -define(TABLE, ?MODULE).
  
  %% Table entry used to keep from starting more than one monitor on the
  %% same process. This isn't a problem but there's no point in starting
  %% multiple monitors if we can avoid it. Note that we can't have a 2-tuple
  %% keyed on Pid since a registered term can be anything. Want the entry
  %% keyed on Pid so that lookup is fast.
  -define(MONITOR(Pid, MRef), {Pid, monitor, MRef}).
  
  %% Table entry containing the Term -> Pid mapping.
  -define(MAPPING(Term, Pid), {Term, Pid}).
  
  -record(state, {id = diameter_lib:now(),
                  q = []}). %% [{From, Pat}]
  
  %% ===========================================================================
  %% # add(T)
  
negative.code: %% # handle_call/3
  %% ----------------------------------------------------------
  
  handle_call({add, Uniq, Key}, {Pid, _}, S0) ->
      Rec = {Key, Pid},
      S1 = flush(Uniq, Rec, S0),
      {Res, New} = insert(Uniq, Rec),
      {Recvs, S} = add(New, Rec, S1),
      notify(Recvs, Rec),
      {reply, Res, S};
  
  handle_call({del, Key}, {Pid, _}, S) ->
      Rec = {Key, Pid},
      Recvs = delete([Rec], S),
      ets:delete_object(?TABLE, Rec),
      notify(Recvs, del),
      {reply, true, S};
  
  handle_call({wait, Pat}, {Pid, _} = From, #state{receivers = RD} = S) ->
      NS = add_monitor(Pid, S),
      case match(Pat) of
          [_|_] = L ->
              {reply, L, NS};
          [] ->
              {noreply, NS#state{receivers = dict:append(Pat, From, RD)}}
      end;
  
  handle_call({subscribe, Pat, T}, {Pid, _}, #state{receivers = RD} = S) ->
      NS = add_monitor(Pid, S),
      {reply, match(Pat), NS#state{receivers = dict:append(Pat, [Pid | T], RD)}};
  
  handle_call(state, _, S) ->
      {reply, S, S};
  