anchor.diff:  
   -define(Threshold, 5).
   
  +-define(StartChildTimeout, 6000).
  +
   %%%===================================================================
   %%% API functions
   %%%===================================================================
  
positive.code: %%                     {error, Reason}
  %% @end
  %%--------------------------------------------------------------------
  init([]) ->
      process_flag(trap_exit, true),
      loop([]).
  
  %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  
  loop(ChildList) ->
      receive
  	{'EXIT', Pid, normal} ->
  	    NewChildList = restart_child(Pid, ChildList, normal),
  	    loop(NewChildList);
  	{'EXIT', Pid, killed} ->
  	    io:format("restarting child killed"),
  	    NewChildList = restart_child(Pid, ChildList, killed),
  	    loop(NewChildList);
  	{'EXIT', Pid, Reason} ->
  	    NewChildList = restart_child(Pid, ChildList, Reason),
  	    loop(NewChildList);
  	{stop, From} ->
  	    From ! {reply, self(), terminate_children(ChildList)};
  	{start_children, ChildSpecList} ->
  	    start_children(ChildSpecList),
  	    loop(ChildList);
  	{ok, ChildPid, ChildSpec} ->
  	    io:format("Child for Spec '~p' is started.~n", [ChildSpec]),
  	    NewChildList = [{ChildPid, ChildSpec}|ChildList],
  	    loop(NewChildList);
  	{error, child_not_started, ChildSpec} ->
  	    io:format("Child for spec ~p cannot be started.~n", [ChildSpec]),
  	    loop(ChildList);
  	{start_child, ChildSpec} ->
  	    start_child(ChildSpec, ?Threshold, 0),
  	    loop(ChildList)
      after 6000 ->
  	    exit(timeout)
      end.
  
  start_children([]) ->
      [];
  start_children([ChildSpec|T]) ->
      self() ! {start_child, ChildSpec},
      start_children(T).
  
negative.code: 	    ?Supervisor ! {ok, Pid, ChildSpec};
  	{error, child_not_started, ChildSpec} ->
  	    io:format("~p. Child for Spec '~p' was not started. Supervisor is trying again.~n", [Acc + 1, ChildSpec]),
  	    receive after round(?StartChildTimeout / ?Threshold) -> ok end,
  	    start_child(ChildSpec, Threshold, Acc + 1)
      end.
  
  