anchor.diff:  delete_links(Ctx, Key, TreeId, Links) when is_list(Links) ->
       datastore_apply(Ctx, Key, fun datastore:delete_links/4, delete_links, [TreeId, Links]);
   delete_links(Ctx, Key, TreeId, Link) ->
  -    ?MODULE:hd(delete_links(Ctx, Key, TreeId, [Link])).
  +    hd_if_list(delete_links(Ctx, Key, TreeId, [Link])).
   
   %%--------------------------------------------------------------------
   %% @doc
  
positive.code:         TreeId, Links
      ]);
  mark_links_deleted(Ctx, Key, TreeId, Link) ->
      ?MODULE:hd(mark_links_deleted(Ctx, Key, TreeId, [Link])).
  
  %%--------------------------------------------------------------------
  %% @doc
  
negative.code: add_links(Ctx, Key, TreeId, Links) when is_list(Links) ->
      datastore_apply(Ctx, Key, fun datastore:add_links/4, add_links, [TreeId, Links]);
  add_links(Ctx, Key, TreeId, Link) ->
      hd_if_list(add_links(Ctx, Key, TreeId, [Link])).
  
  %%--------------------------------------------------------------------
  %% @doc
  