anchor.diff:  -behaviour(gen_server).
   
   %% API
  +-export([add_dom/2, del_dom/1, dom_lang/1]).
   -export([start_link/0]).
   
   %% gen_server callbacks
  
positive.code: 
  -define(SERVER, ?MODULE).
  
  -record(state, {}).
  
  %%----------------------------------------------------------------------------
  %% API
  %%----------------------------------------------------------------------------
  
  start_link() ->
      gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
  
negative.code: 
  %% @private
  init([]) ->
      {ok, #state{dom_lang = dict:new()}}.
  
  %% @private
  handle_call({add_dom, DomId, Lang}, _From, State) ->
      Dict = State#state.dom_lang,
      case dict:is_key(DomId, Dict) of
          true ->
              {reply, error, State};
          false ->
              NextState = State#state{dom_lang = dict:store(DomId, Lang, Dict)},
              {reply, ok, NextState}
      end;
  handle_call({del_dom, DomId}, _From, State) ->
      NextState =
          State#state{dom_lang = dict:erase(DomId, State#state.dom_lang)},
      {reply, ok, NextState};
  handle_call({dom_lang, DomId}, _From, State) ->
      Reply = dict:find(DomId, State#state.dom_lang),
      {reply, Reply, State}.
  
  %% @private
  