let rec mapToTreeEdges graphedgelist tree =
    match graphedgelist with
      x :: tail -> mapToTreeEdges tail (addNewEdge tree x)
    | _ -> tree