anchor.diff:     -> [{pattern(), [from()]}].
   
   waits() ->
  -    #state{receivers = RD} = state(),
  -    dict:fold(fun wait/3, orddict:new(), RD).
  -
  -wait(Pat, Ps, Dict) ->
  -    lists:foldl(fun({_,_} = F, D) -> orddict:append(Pat, F, D);
  -                   (_, D) -> D
  -                end,
  -                Dict,
  -                Ps).
  +    #state{notify = Dict} = state(),
  +    [{K, Ts} || {K,Ps} <- maps:to_list(Dict),
  +                Ts <- [[T || {_,_} = T <- Ps]]].
   
   %% ----------------------------------------------------------
   %% # init/1
  
positive.code:    -> [{key(), [pid()]}].
  
  terms() ->
      to_list(fun id/1).
  
  swap({X,Y}) -> {Y,X}.
  
  %% subs/0
  
  
negative.code: %% # handle_call/3
  %% ----------------------------------------------------------
  
  handle_call({add, Uniq, Key}, {Pid, _}, S) ->
      Rec = {Key, Pid},
      NS = flush(Uniq, Rec, S),  %% before insert
      {Res, New} = insert(Uniq, Rec),
      {reply, Res, notify(add, New andalso Rec, NS)};
  
  handle_call({remove, Key}, {Pid, _}, S) ->
      Rec = {Key, Pid},
      ets:delete_object(?TABLE, Rec),
      {reply, true, notify(remove, Rec, S)};
  
  handle_call({wait, Pat}, {Pid, _} = From, S) ->
      NS = add_monitor(Pid, S),
      case match(Pat) of
          [_|_] = Recs ->
              {reply, Recs, NS};
          [] ->
              {noreply, queue(Pat, From, NS)}
      end;
  
  handle_call({subscribe, Pat, T}, {Pid, _}, S) ->
      {reply, match(Pat), queue(Pat, [Pid | T], add_monitor(Pid, S))};
  
  handle_call(state, _, S) ->
      {reply, S, S};
  