anchor.diff:  start_link() ->
       gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
   
  +register_client(Pid) ->
  +    gen_server:call(?MODULE, {register_client, Pid}, infinity).
  +
  +clients() ->
  +    gen_server:call(?MODULE, clients, infinity).
  +
  +
   %%%===================================================================
   %%% gen_server callbacks
   %%%===================================================================
   
   init([]) ->
  -    {ok, #state{}}.
  +    Clients = sets:new(),
  +    {ok, #state{clients=Clients}}.
   
  +handle_call(count_clients, _From, State) ->
  +    Count = count_clients(State#state.clients),
  +    {reply, {ok, Count}, State};
  +handle_call({register_client, Pid}, _From, State) ->
  +    NewClients = register_client(Pid, State#state.clients),
  +    {reply, ok, State#state{clients=NewClients}};
   handle_call(_Request, _From, State) ->
       {reply, ok, State}.
   
  
positive.code: -behaviour(gen_server).
  
  %% API
  -export([start_link/0]).
  
  %% gen_server callbacks
  -export([init/1,
  
negative.code: %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  
  %% @spec register_client(pid(), set()) -> set()
  %% @doc Register a new client.
  register_client(Pid, Clients) ->
      sets:add_element(Pid, Clients).
  
  %% @spec count_clients(set()) -> number()
  %% @doc Count clients.
  count_clients(Clients) ->
      sets:size(Clients).
  