Returns <L>(
edges: readonly [label: L, from: K, to: readonly K[]][],
) => {
getVertex: (vertex: Vertex) => [label: L, from: K, to: readonly K[]];
graph: Graph.Graph;
indexVertex: (key: K) => Option.Option<Vertex>;
}
The new graph, function to get a corresponding vertex, and function to index a vertex by a key.
Builds a new
Graphwith the total order and edges with its label.