foreach DFS/BFS for tree data-structure?

Robert M. Münch robert.muench at saphirion.com
Thu Jun 14 12:35:32 UTC 2018


On 2018-06-14 11:46:04 +0000, Dennis said:

> 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

Ah... that looks very good. Need to dig a bit deeper on how to use it. Thanks.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list