On Thursday, 26 March 2026 at 21:47:59 UTC, solidstate1991 wrote:

Is there some other way to implement a tree traversal, that preferably works with `foreach` or at least somewhat easy to use?

https://forum.dlang.org/thread/[email protected]

I think theres better ways to do it then this gist but intrusive lists

Im unsure what problems you have with the anti-work keywords, but you have at least three options with what ive seen:

smart handles: mixin+index, limits you to 1 array but elements know where root is implicitly

add indexes to your types: assume the root is index 0 or 1, then you should be able to generate a range from the array

add an index array to your datastructure.

Reply via email to