anchor.diff:  %% It's up to the caller to ensure that the wait won't be forever.
   %% ===========================================================================
   
  --spec wait(any())
  +-spec wait(pattern())
  +   -> [{key(), pid()}].
  +
  +wait(Pat) ->
  +    _ = match(Pat),  %% ensure match can succeed
  +    call({wait, Pat}).
  +
  +%% ===========================================================================
  +%% # subscribe(Pat, T)
  +%%
  +%% Like match/1, but additionally receive messages of the form
  +%% {T, add|del, {term(), pid()} when associations are added
  +%% or removed.
  +%% ===========================================================================
  +
  +-spec subscribe(Pat :: any(), T :: term())
      -> [{term(), pid()}].
   
  -wait(Pat) ->
  -    call({wait, Pat}).
  +subscribe(Pat, T) ->
  +    _ = match(Pat),  %% ensure match can succeed
  +    call({subscribe, Pat, T}).
   
   %% ===========================================================================
   
  
positive.code: %%
  %% An association is removed when the calling process dies or as a
  %% result of calling del/1. Adding the same term more than once is
  %% equivalent to adding it exactly once.
  %%
  %% Note that since match/1 takes a pattern as argument, specifying a
  %% term that contains match variables is probably not a good idea
  %% ===========================================================================
  
  -spec add(any())
     -> true.
  
  add(T) ->
      call({add, fun ets:insert/2, T, self()}).
  
  %% ===========================================================================
  %% # add_new(T)
  
negative.code: 
  %% test
  -export([pids/0,
           terms/0,
           subs/0,
           waits/0]).
  
  %% debug
  -export([state/0,
  