How do I traverse a multiway tree with the following type definition from leaves to the top
type tree = Branch of float * tree list | Leaf