anchor.diff:    orddict:merge(Merger, D1, D2).
   
   -else.
  +
  +empty_map() ->
  +  #{}.
  +
  +is_empty_map(Map) ->
  +  maps:size(Map) =:= 0.
  +
  +lookup_clock(P, ClockMap) ->
  +  maps:get(P, ClockMap, clock_new()).
  +
  +clock_map_store(Actor, Clock, ClockMap) ->
  +  maps:put(Actor, Clock, ClockMap).
   
   clock_new() ->
     #{}.
  
positive.code: 
  -record(trace_state, {
            actors                        :: [pid() | channel_actor()],
            clock_map        = dict:new() :: clock_map(),
            done             = []         :: [event()],
            enabled          = []         :: [pid() | channel_actor()],
            index                         :: index(),
  
negative.code: %%% Helper functions
  %%%----------------------------------------------------------------------
  
  -ifdef(BEFORE_OTP_17).
  
  empty_map() ->
    dict:new().
  
  is_empty_map(Map) ->
    dict:size =:= 0.
  
  clock_map_store(P, V, ClockMap) ->
    dict:store(P, V, ClockMap).
  
  lookup_clock(P, ClockMap) ->
    case dict:find(P, ClockMap) of
      {ok, Clock} -> Clock;
      error -> clock_new()
    end.
  
  clock_new() ->
    orddict:new().
  
  