foreach DFS/BFS for tree data-structure?

Dennis dkorpel at gmail.com
Thu Jun 14 11:46:04 UTC 2018


On Thursday, 14 June 2018 at 11:31:50 UTC, Robert M. Münch wrote:
> Is this possible? I read about Inputranges, took a look at the 
> RBTree code etc. but don't relly know/understand where to start.

You can also use opApply to iterate over a tree using foreach, 
see:
https://tour.dlang.org/tour/en/gems/opdispatch-opapply


More information about the Digitalmars-d-learn mailing list