effect-tree - v1.0.36
    Preparing search index...

    Function treeToGraph

    • Convert a tree into an Effect Graph.

      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.

      Type Parameters

      • A

      Parameters

      Returns Graph<A, "">