For a rose tree, fold each child recursively, retaining their order, and supply the resulting list with the current label to the combining function:
foldRTree :: (a -> [b] -> b) -> RTree a -> b
foldRTree f (Node x ts) = f x (map (foldRTree f) ts)
The defining tree foldequation is foldRTreef(Nodexts)=fx(map(foldRTreef)ts). Aleaf passes []as the list of child results; an internal node passes one result per child. Thus the combining function controls both cases without a separate leaf constructor.