anchor.diff:      %% the interval covered by chunk is either the biggest key left of startid
       %% or if there are no keys left of startid simply the biggest key in chunk
       {Left, Right} = lists:splitwith(fun({Key, _, _, _, _}) -> Key < StartId end,
  -                                    lists:sort(Chunk)),
  +                                    Chunk),
       Last = case Left of
           [] ->
  -            element(1, lists:last(Right));
  -        _ ->
  -            element(1, lists:last(Left))
  +            element(1, lists:max(Right));
  +        [_|_] ->
  +            element(1, lists:max(Left))
       end,
       ?TRACE_CHUNK("left: ~p~nright: ~p~ncalc_remaining:~n~p~nNext is ~p minus ~p",
                    [Left, Right, Chunk, Interval, intervals:new('[', StartId, Last, ']')]),
  
positive.code: %%      matching.
  -spec call_subscribers(State::db(), Operation::close_db | subscr_op_t()) -> db().
  call_subscribers(State = {_DB, Subscr, _SnapState}, Operation) ->
      {NewState, _Op} =?DB:foldl(Subscr,
                fun call_subscribers_iter/2,
                {State, Operation}),
      NewState.
  
negative.code:             case intervals:in(Key, MyNewInterval) of
                  true -> {StateAcc, HisList};
                  _ -> NewHisList = case db_entry:is_empty(DBEntry) of
                                        false -> [DBEntry | HisList];
                                        _ -> HisList
                                    end,
                      {delete_entry_at_key(StateAcc, Key, split), NewHisList}
              end
      end,
  