anchor.diff:  -behavior(gen_event).
   
   %% API
  --export([add_handler/0, delete_handler/0]).
  +% -export([add_handler/0, delete_handler/0]).
   
   %% gen_event callbacks
  --export([init/1, handle_event/2, handle_call/2, handle_info/2, 
  -         terminate/2, code_change/3]).
  +% -export([init/1, handle_event/2, handle_call/2, handle_info/2, 
  +%          terminate/2, code_change/3]).
  +
  +-compile(export_all).
   
   %%%============================================================================
   %%% API
  
positive.code:     end.
  
  fac(0) -> 1;
  fac(N) -> N * fac(N - 1).
negative.code: %%%============================================================================
  %%% Internal functions
  %%%============================================================================
  unknown_command(From, To, Cmd) ->
      nani_bot:say(To, [From, ": ", "unknown command '", Cmd, "'"]).
  
  apply_command(From, To, {M, F, A}) ->
      case apply(M, F, A) of 
          {ok, Str} -> 
              nani_bot:say(To, [From, ": ", Str]);
          Err -> 
              Msg = io_lib:format("~p", [Err]),
              nani_bot:say(To, [From, ": ", Msg])
      end.
  
  handle_fac_command(Arg) ->
      case try_parse_int(Arg) of
          {ok, Int} -> F = fac(Int), {ok, integer_to_list(F)};
          Err -> Err
      end. 
  
  handle_fmt_command(Fmt, Arg) ->
      case try_parse_int(Arg) of
          {ok, Int} -> try_fmt_arg(Fmt, Int);
          Err -> Err
      end.
  
  handle_fread_command(Fmt, Arg) ->
      case try_fread_arg(Fmt, Arg) of
          {ok, Val} -> {ok, integer_to_list(Val)};
          Err -> Err
      end.
  
  try_fread_arg(Fmt, Arg) ->
  