Looks like the pattern effectively linearizes the hierarchical structure. So you can stream or iterate over the ouput of a visitor run, as the author said.
Could one just implement an iterator on top of a tree structure? This would be similar but be imperative right rather than declarative as you would not provide a “callback”, but pull out nodes directly.