RazrFalcon / rctree

A "DOM-like" tree implemented using reference counting
MIT License
36 stars 10 forks source link

Implement DoubleEndedIterator for children #4

Closed pbor closed 5 years ago

pbor commented 5 years ago

Remove the ReverseChildren iterator and implement a double ended iterator instead.

RazrFalcon commented 5 years ago

Thanks. What about reverse_traverse?

pbor commented 5 years ago

I am trying to replace a custom tree implementation with rctree and we have a double ended iterator... I could have just replaced our calls to children().rev() with reverse_children(), but I thought it might make sense to propose the double ended iterator upstream.

pbor commented 5 years ago

I can (try to) do reverse_traverse as well if you like the idea

RazrFalcon commented 5 years ago

Yes. I like it, because it's more idiomatic.

pbor commented 5 years ago

Cool, I will take a look at reverse_traverse then.

And thanks for the quick feedback.... this must be a record :smile:

RazrFalcon commented 5 years ago

Thanks!

I've missed your last patch for some reason.