anchor.diff:  %% @doc Converts the (external) representation of the routing table to a list
   %%      in the order of the fingers, i.e. first=succ, second=shortest finger,
   %%      third=next longer finger,...
  +-spec to_list(dht_node_state:state()) -> nodelist:snodelist().
   to_list(#rt_t{} = RT) ->
       SourceNode = get_source_node(RT),
       % sort
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  %% userdevguide-begin rt_frtchord:empty_ext
  empty_ext(Neighbors) -> empty(Neighbors).
  %% userdevguide-end rt_frtchord:empty_ext
  
  %% userdevguide-begin rt_frtchord:next_hop
  %% @doc Returns the next hop to contact for a lookup.
  %% TODO Next hop contains type errors
  next_hop(State, Id) ->
      Neighbors = dht_node_state:get(State, neighbors),
      case intervals:in(Id, nodelist:succ_range(Neighbors)) of
  
negative.code: %% userdevguide-begin rt_frtchord:filter_dead_node
  %% @doc Removes dead nodes from the routing table (rely on periodic
  %%      stabilization here).
  -spec filter_dead_node(rt(), comm:mypid()) -> rt().
  filter_dead_node(RT, DeadPid) -> 
      % find the node id of DeadPid and delete it from the RT
      [Node] = [N || {N, _,_,_} <- to_list(RT), node:pidX(N) =:= DeadPid],
  