anchor.diff:  restart_rec(L) ->
       Save = lists:foldl(
                fun
  -                 ({R,_}, Acc) when is_integer(R) -> 
  +                 ({R,_}, Acc) when is_integer(R) ->
                        erlang:max(R, Acc);
  -                 (_, Acc) -> 
  +                 (_, Acc) ->
                        Acc
                end, 0, L),
       #restart{spec = L, save_n = Save}.
  
positive.code:         exit:_ -> false
      end.
  
  retrieve_metric({Metric, _, Enabled}, Subscribers, Acc) ->
      [ { Metric, exometer:info(Metric, datapoints),
          get_subscribers(Metric, Subscribers), Enabled } | Acc ].
  
  
  get_subscribers(_Metric, []) ->
      [];
  
  %% This subscription matches Metric
  get_subscribers(Metric, [ #subscriber {
                               key = #key {
                                 reporter = SReporter,
                                 metric = Metric,
                                 datapoint = SDataPoint
                                }} | T ]) ->
      ?debug("get_subscribers(~p, ~p, ~p): match~n", [ Metric, SDataPoint, SReporter]),
      [ { SReporter, SDataPoint } | get_subscribers(Metric, T) ];
  
  %% This subscription does not match Metric.
  get_subscribers(Metric, [ #subscriber {
                               key = #key {
                                 reporter = SReporter,
                                 metric = SMetric,
                                 datapoint = SDataPoint
                                }} | T]) ->
      ?debug("get_subscribers(~p, ~p, ~p) nomatch(~p) ~n",
                [ SMetric, SDataPoint, SReporter, Metric]),
      get_subscribers(Metric, T).
  
  %% Purge all subscriptions associated with a specific reporter
  %% (that just went down).
  
negative.code: %%% Internal functions
  %%%===================================================================
  
  is_valid_metric({find, Name}, _DataPoint) when is_list(Name) ->
      true;
  is_valid_metric({select, Name}, _DataPoint) when is_list(Name) ->
      try ets:match_spec_compile(Name), true
      catch
  	error:_ -> false
      end;
  is_valid_metric(Name, default) when is_list(Name) ->
      case exometer:info(Name, type) of
  	undefined -> false;
  	_ -> true
      end;
  is_valid_metric(Name, DataPoint) when is_list(Name) ->
      case dp_list(DataPoint) of
  	[] -> false;
  	[_|_] = DataPoints ->
  	    case exometer:info(Name, datapoints) of
  		undefined -> false;
  		DPs ->
  		    case DataPoints -- DPs of
  			[] -> true;
  			_  -> false
  		    end
  	    end
      end;
  is_valid_metric(_, _) ->
      false.
  
  dp_list(DP) when is_list(DP) -> DP;
  dp_list(DP) when is_atom(DP) -> [DP].
  
  get_values(Name, DataPoint) when is_list(Name) ->
      case exometer:get_value(Name, DataPoint) of
  	{ok, Values} -> [{Name, Values}];
  	_ -> []
      end;
  get_values({How, Path}, DataPoint) ->
      Entries = case How of
  		  find   -> exometer:find_entries(Path);
  		  select -> exometer:select(Path)
  	      end,
      lists:foldr(
        fun({Name, _, enabled}, Acc) ->
  	      case exometer:get_value(Name, DataPoint) of
  		  {ok, Values} ->
  		      [{Name, Values}|Acc];
  		  _ ->
  		      Acc
  	      end;
  	 (_, Acc) -> Acc
        end, [], Entries).
  
  
  %% first_datapoint([DP|_]) ->
  %%     DP;
  %% first_datapoint(DP) when is_atom(DP); is_integer(DP) ->
  %%     DP.
  
  
  assert_no_duplicates([{R,_}|T]) ->
  