anchor.diff:  -spec get_load(DB::db()) -> non_neg_integer().
   get_load({DB, _DBName}) ->
       %% TODO: not really efficient (maybe store the load in the DB?)
  -	hanoidb:fold(DB, fun (_K, _V, Load) -> Load + 1 end, 0).
  +    hanoidb:fold(DB, fun (_K, _V, Load) -> Load + 1 end, 0).
   
   %% @equiv hanoidb:fold_range(DB, Fun, Acc0, #key_range{from_key = <<>>, to_key = undefined})
   %% @doc Returns a potentially larger-than-memory dataset. Use with care.
  
positive.code: %%      stops as soon as MaxNum elements have been encountered.
  %%      Returns a potentially larger-than-memory dataset. Use with care.
  -spec foldr(DB::db(), Fun::fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A,
                                 Intervall::db_backend_beh:interval(), MaxNum::non_neg_integer()) -> Acc1::A.
  foldr(State, Fun, Acc, Interval, MaxNum) ->
      foldr_helper(State, Fun, Acc, Interval, MaxNum).
  
  %% @private this helper enables us to use -1 as MaxNum. MaxNum == -1 signals that all
  %%          data is to be retrieved.
  -spec foldr_helper(DB::db(), Fun::fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A,
                                 Intervall::db_backend_beh:interval(), MaxNum::integer()) -> Acc1::A.
  foldr_helper({DB, _FileName}, Fun, Acc, Interval, MaxNum) ->
  	% TODO evaluate hanoidb:fold_range(DB, Fun, Acc, #key_range{limit=N, from_key=K1, to_key=K2})
      %% first only retrieve keys so we don't have to load the whole db into memory
      Keys = get_all_keys(DB, Interval, -1),
      CutData = case MaxNum of
  
negative.code: %%      stops as soon as MaxNum elements have been encountered.
  %%      Returns a potentially larger-than-memory dataset. Use with care.
  -spec foldl(DB::db(), Fun::fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A,
              Intervall::db_backend_beh:interval(), MaxNum::non_neg_integer()) -> Acc1::A.
  foldl(State, Fun, Acc, Interval, MaxNum) ->
      %% HINT
      %% Fun can only be applied in a second pass. It could do a delete (or other
      %% write op) but CAN HanoiDB handle writes whiles folding ? (TODO check YES?)
      %% Since we reversed the order while accumulating reverse it by using lists
      %% fold but "from the other side". TODO check this for HanoiDB
      %hanoidb:fold_range(DB, Fun, Acc, #key_range{limit=N, from_key=K1, to_key=K2}) % TODO check it is possible
      foldl_helper(State, Fun, Acc, Interval, MaxNum).
  
  %% @private this helper enables us to use -1 as MaxNum. MaxNum == -1 signals that all
  %%          data is to be retrieved.
  -spec foldl_helper(DB::db(), Fun::fun((Key::key(), AccIn::A) -> AccOut::A), Acc0::A,
                     Intervall::db_backend_beh:interval(), MaxNum::integer()) -> Acc1::A.
  foldl_helper({DB, _FileName}, Fun, Acc, Interval, MaxNum) ->
      Keys = get_all_keys(DB, Interval, MaxNum), % hopefully MaxNum caps it.
      lists:foldr(Fun, Acc, Keys). % db:foldL calls lists:foldR
      % TODO May be hanoidb:fold_range is less RAM intensive : no need to keep all keys in RAM at once, but continuous folding instead.
  
  %% @doc makes a foldr over the whole dataset.
  %%      Returns a potentially larger-than-memory dataset. Use with care.
  