Personally, I'm not really seeing a point to it. If I have to write the functors your function takes then it isn't saving me much time or code. So I might as well write an iterator and traversal functions myself.
Ok, now I understand the point of critisism, it seems people are annoyed by the sourrounding "body".
My question was the "Algorithm", i.e. the traversal.
I spend hours to search for an NON recursive algorithm on n-trees. No problem to find for binary trees, but not for n-ary trees, in the case of HGL - my project - rather complex compositions.
A "naive" recursive implementation would lead with guarantee earlier or later to stack overflows or at least to an inacceptable performance.
In my case I took the the ideas from the great book "Algorithms" by R. Sedgewick, where he spends some lines on how to remove recusrsion from arbitrary functions.
I implemented the "naive" algorithm first and succesively removed the recursion according his scheme and finally improved it to a "readable" source. His scheme leads to code with an horrible amount of "gotos" in it. This is wanted by him and he notes after testing, the next step is too change all gotos to ordinary loops.
I.e. the "traversal" itself is the point. About the "body" I'm willing to try out every suggestion, but my question was about the algorithm itself.
EDIT: BTW: HGL has a iterator on top of it, but it is too specialized to include into the article.