A version of the graph algorithms described in:
Structuring Depth-First Search Algorithms in Haskell, by David King and John Launchbury.
Adjacency list representation of a graph, mapping each vertex to its list of successors.
Build a graph from a list of nodes uniquely identified by keys, with a list of keys of nodes this node should have edges to. The out-list may contain keys that don't correspond to nodes of the graph; they are ignored.
Identical to graphFromEdges, except that the return value does not include the function which maps keys to vertices. This version of graphFromEdges is for backwards compatibility.