Refactor Tree.map in terms of foldLeft