I\'ve got a tree-like structure. Each element in this structure should be able to return a Enumerable of all elements it is root to. Let\'s call this method IEnumerabl
It's certainly not ideal in terms of performance - you end up creating a lot of iterators for large trees, instead of a single iterator which knows how to traverse efficiently.
Some blog entries concerning this:
It's worth noting that F# has the equivalent of the proposed "yield foreach
" with "yield!
"