anchor.diff:     -> [{pid(), [key()]}].
   
   pids() ->
  -    to_list(fun swap/1).
  -
  -to_list(Fun) ->
  -    ets:foldl(fun(T,D) -> append(Fun(T), D) end, orddict:new(), ?TABLE).
  -
  -append({K,V}, Dict) ->
  -    orddict:append(K, V, Dict).
  -
  -id(T) -> T.
  +    append(ets:select(?TABLE, [{{'$1','$2'}, [], [{{'$2', '$1'}}]}])).
  +
  +append(Pairs) ->
  +    dict:to_list(lists:foldl(fun({K,V}, D) -> dict:append(K, V, D) end,
  +                             dict:new(),
  +                             Pairs)).
   
   %% terms/0
   
  
positive.code:    -> [{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).
  
  %% ----------------------------------------------------------
  %% # init/1
  
negative.code: %% flush/2
  
  %% Process has died and should no longer receive messages/replies.
  flush(Pid, #state{notify = Dict} = S) ->
      S#state{notify = maps:fold(fun(P,Rs,D) -> flush(Pid, P, Rs, D) end,
                                 Dict,
                                 Dict)}.
  
  %% flush/4
  
  flush(Pid, Pat, Rcvrs, Dict) ->
      reset(Pat, Dict, [T || T <- Rcvrs, Pid /= head(T)]).
  
  %% head/1
  
  