anchor.diff:  -export([foldl/3, foldl/4, foldl/5]).
   -export([foldr/3, foldr/4, foldr/5]).
   
  --type db() :: tid() | atom().
  +-type db() :: ets:tab().
   -type key() :: db_backend_beh:key(). %% '$end_of_table' is not allowed as key() or else iterations won't work!
   -type entry() :: db_backend_beh:entry().
   
  
positive.code: foldl(_DB, _Fun, Acc, {interval, _, '$end_of_table', _End, _}, _MaxNum) -> Acc;
  foldl(_DB, _Fun, Acc, {interval, _, _Start, '$end_of_table', _}, _MaxNum) -> Acc;
  foldl(_DB, _Fun, Acc, {interval, _, Start, End, _}, _MaxNum) when Start > End -> Acc;
  foldl(DB, Fun, Acc, {element, El}, _MaxNum) -> 
      case ets:lookup(DB, El) of
          [] ->
              Acc;
  
negative.code: foldr(DB, Fun, Acc, all, MaxNum) ->
      foldr(DB, Fun, Acc, {interval, '[', ets:first(DB), ets:last(DB), ']'},
            MaxNum);
  foldr(DB, Fun, Acc, {interval, '(', End, Start, RBr}, MaxNum) ->
      foldr(DB, Fun, Acc, {interval, '[', ets:next(DB, End), Start, RBr}, MaxNum);
  foldr(DB, Fun, Acc, {interval, LBr, End, Start, ')'}, MaxNum) ->
      foldr(DB, Fun, Acc, {interval, LBr, End, ets:prev(DB, Start), ']'}, MaxNum);
  foldr(DB, Fun, Acc, {interval, '[', End, Start, ']'}, MaxNum) ->
      case ets:lookup(DB, Start) of
  