func printSubtree(tree *Tree, level int) {
	space := ""
	for i := 0; i < level; i++ {
		space += "  "
	}
	for _, l := range tree.Leaves {
		fmt.Println(space, "-", l.Tag)
	}
	for _, b := range tree.Branches {
		fmt.Println(space, "+", b.Name)
		printSubtree(b, level+1)
	}
}
// printSubtree is a recursive helper function to traverse the tree
printSubtree is a recursive helper function to traverse the tree
// printSubtree is a recursive helper function to traverse the tree
func printSubtree(tree *Tree, level int) {
	space := ""
	for i := 0; i < level; i++ {
		space += "  "
	}
	for _, l := range tree.Leaves {
		fmt.Println(space, "-", l.Tag)
	}
	for _, b := range tree.Branches {
		fmt.Println(space, "+", b.Name)
		printSubtree(b, level+1)
	}
}
func printSubtree ( tree * Tree , level int ) { space := " " for i := 0 ; i < level ; i ++ { space += " " } for _ , l := range tree . Leaves { fmt . Println ( space , " " , l . Tag ) } for _ , b := range tree . Branches { fmt . Println ( space , " " , b . Name ) printSubtree ( b , level + 1 ) } }
printSubtree is a recursive helper function to traverse the tree
printSubtree is a recursive helper function to traverse the tree