anchor.diff:      ].
   
   normalize_test_() ->
  +    Normalize = fun(S) -> {N, _, _, _} = normalize(S), N end,
       Series = [pseudo_series([1,1,1], 20), pseudo_series([2,2,2,2,2,2])],
  -    [?_assertEqual([pseudo_series([1,1,1], 20), pseudo_series([2.0,2.0,2.0], 20)], normalize([Series]))].
  +    [?_assertEqual([pseudo_series([1,1,1], 20), pseudo_series([2.0,2.0,2.0], 20)], Normalize([Series]))].
   
   zip_lists_test_() ->
       [?_assertEqual([], zip_lists([], fun lists:sum/1)),
  
positive.code: zip_heads(Lists, Func) ->
      Lsts = lists:foldl(fun([], _Acc) -> undefined;
                            (_, undefined) -> undefined;
                            ([Hd | Tl], {Heads, Tails}) ->
                                 % appending (`++`) should be fine in here because the
                                 % number of lists will be rather small compared to
                                 % the number of values of each list
                                 {Heads ++ [Hd], [Tl | Tails]}
                         end, {[], []}, Lists),
      case Lsts of
          undefined -> undefined;
          {Heads, Tails} ->
              {Func(Heads), Tails}
      end.
  
  
  safe_minimum([]) -> null;
  
negative.code: 
  normalize(SeriesLst) ->
      Series = lists:flatten(SeriesLst),
      {Start, End, Step} = normalize_stats(Series),
      % TODO: properly handle start/stop
      % TODO: this is sufficient for now as most of the time start/end are the same over all series
      Ss = lists:map(fun(S) -> consolidate(S, Step div S#series.step) end, Series),
      {Ss, Start, End, Step}.
  
  
  normalize_stats([Hd | Tl]) ->
  