Prev method or descending order
recoilme opened this issue · comments
Vadim Kulibaba commented
Hello
Is it possible? Give me a direction, please...
Pavel Larkin commented
Check it here
https://github.com/plar/go-adaptive-radix-tree/blob/master/tree_traversal.go#L71-L73.
The callback should be called after the *switch* block.
In that case you will get nodes in the reverse order.
You can implement extra options: TraverseDirectionForward and
TraverseDirectionReverse and use it for conditional `callback` method call
inside the `forEach` method.
Fill free to send a PR.
Vadim Kulibaba commented
Thank you! I will try
Vadim Kulibaba commented
PR: #3