anchor.diff:  
   terminate(_Reason,_Stats) ->
   	ok.
  +
  +populate(Size) ->
  +	[ 0 || _X <- lists:seq(1,Size) ].
  +
  +allocate(Stats = #stats{ windows = Windows, sizes = Sizes },Stat,Size) ->
  +	Stats#stats{
  +		windows = [ { Stat, populate(Size) } | proplists:delete(Stat,Windows) ],
  +		sizes = [ { Stat, Size } | proplists:delete(Stat,Sizes) ]
  +	}.
  +
  +rotate(Stats = #stats{ windows = Windows }, Stat, Value) ->
  +	case proplists:lookup(Stat,Windows) of 
  +		{ Stat, Values } -> [ _H | T ] = Values;
  +		none -> T = []	%% assume we are only tracking a single value
  +	end,	
  +	Stats#stats{ windows = [ { Stat, T ++ [Value] } | proplists:delete(Stat,Windows) ]}.
  +
  +reset(Stats = #stats{ windows = Windows, sizes = Sizes }, Stat) ->
  +	case proplists:lookup(Stat,Sizes) of
  +		{ Stat, Size } -> Window = populate(Size);
  +		none -> Window = [0]
  +	end,
  +	Stats#stats{ windows =  [ { Stat, Window } | proplists:delete(Stat,Windows) ]}.
  +
  +
  
positive.code: -author({ "David J Goehrig", "dave@dloh.org" }).
  -copyright(<<"© 2016 David J Goehrig"/utf8>>).
  -behavior(gen_server).
  -export([ start_link/0, stop/0, log/2, dump/0 ]).
  -export([ code_change/3, handle_call/3, handle_cast/2, handle_info/2, init/1,
  	terminate/2 ]).
  
  -record(stats, { windows, size }).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Public APU
  
negative.code: 		Windows),
  	{ reply, ok, Stats };
  
  handle_call({ allot, Stat, Size}, _From, Stats) ->
  	{ reply, ok, allocate(Stats,Stat,Size) };
  
  handle_call({ log, Stat, Value }, _From, Stats) ->
  	{ reply, ok, rotate(Stats,Stat,Value) };
  
  handle_call({ clear, Stat }, _From, Stats) ->
  	{ reply, ok, reset(Stats,Stat) };
  
  handle_call(Message,_From,Stats) ->
  	io:format("[stats] unknown message ~p~n", [ Message ]),
  