Run a function to change the root node forest. If the tree is a Leaf
the given function will receive the empty array as a parameter, if it returns
any trees then leaves will be turned into a Branches, and if it
returns the empty array branches will be turned into leaves.
Run a function to change the root node forest. If the tree is a Leaf the given function will receive the empty array as a parameter, if it returns any trees then leaves will be turned into a Branches, and if it returns the empty array branches will be turned into leaves.