anchor.diff:  vertex_get_edges(V=?VERTEX(Id), Type) ->
       [ E || E=?EDGE(EId,T,A,B) <- vertex_get_edges(V), T =:= Type ].
   
  +% @doc Get all vertices connected ith a given vertex.
   vertex_get_neighbourhood(V=?VERTEX(Id)) ->
  -    lists:map(
  -        fun(?EDGE(EId,T,A,B))->
  -            if 
  -                A =:= Id ->
  -                    B;
  -                true ->
  -                    A
  -            end
  -        end, 
  -        vertex_get_edges(V)).
  +    get_other_nodes(Id,vertex_get_edges(V)).
  +
  +% @doc Get all vertices connected with a given vertex
  +% by an edge of a given type.
  +vertex_get_neighbourhood(V=?VERTEX(Id), Type) ->
  +    get_other_nodes(Id,vertex_get_edges(V, Type)).
   
   % @doc Set a property at a vertex.
   vertex_set_property(?VERTEX(Id), Key, Val) ->
       private_set_property(vertex, Id, Key, Val).
   
  +% @doc Delete a property at a vertex.
   vertex_del_property(?VERTEX(Id), Key) ->
       private_del_property(vertex, Id, Key).
   
  +% @doc Get a property at a vertex.
   vertex_get_property(?VERTEX(Id), Key) ->
       private_get_property(vertex, Id, Key).
   
  +% @doc Get all properties at a vertex.
   vertex_get_properties(?VERTEX(Id)) ->
       private_get_properties(vertex, Id).
   
  
positive.code: edge_get_adjacent_vertices(?EDGE(_Id,_Type,A,B)) ->
      {?VERTEX(A),?VERTEX(B)}.
  
  edge_get_start_vertex(Edge) ->
      {Start,_End} = edge_get_adjacent_vertices(Edge),
      Start.
  
  edge_get_end_vertex(Edge) ->
      {_Start,End} = edge_get_adjacent_vertices(Edge),
      End.
  
  edge_get_type(?EDGE(_Id,Type,_A,_B)) ->
      Type.
  
  edge_set_property(?EDGE(Id,_Type,_A,_B), Key, Val) ->
      private_set_property(edge, Id, Key, Val).
  
  edge_del_property(?EDGE(Id,_Type,_A,_B), Key) ->
      private_del_property(edge, Id, Key).
  
  edge_get_property(?EDGE(Id,_Type,_A,_B), Key) ->
      private_get_property(edge, Id, Key).
  
  edge_get_properties(?EDGE(Id,_Type,_A,_B)) ->
      private_get_properties(edge, Id).
  
  
negative.code:         ,del_edge/1
          ,vertex_get_edges/1
          ,vertex_get_edges/2
          ,vertex_get_neighbourhood/1
          ,vertex_get_neighbourhood/2
          ,vertex_set_property/3
          ,vertex_del_property/2
          ,vertex_get_property/2
  