nodes(Graph)
l
nodes(Graph) =
remove_duplicates(append(map(first, Graph),
map(second, Graph)));
l
remembering our assumption: that every node in the graph is on
one or the other end of an arc, i.e. there are no isolated nodes,
as in the graph below.