A Tree<A> is converted into a DirectedGraph<A, “”>: a directed graph
with nodes of type A and an empty string associated with each edge.
We do this in two steps. First we replace the tree nodes with their graph
node Id giving us a tree of node Ids, then we get the edge list of this tree
and add each edge to the graph.
Convert a tree into an Effect Graph.
A
Tree<A>is converted into aDirectedGraph<A, “”>: a directed graph with nodes of typeAand an empty string associated with each edge.We do this in two steps. First we replace the tree nodes with their graph node Id giving us a tree of node Ids, then we get the edge list of this tree and add each edge to the graph.