add Tree.findDepthFirst and Tree.findBreadthFirst and Tree.filter - #1541
add Tree.findDepthFirst and Tree.findBreadthFirst and Tree.filter#1541jituanlin wants to merge 1 commit into
Conversation
|
Hi @gcanti ! |
|
This would be really helpful for me too. One thing to consider would be whether the find and filter should be operating on the tree itself, or the value contained. When it comes to filter (which is really useful to me), it would probably be worth having both a depth first and breadth first option if we're operating on the tree, as when filtering an element your predicate may care about how many filtered children remain, for example. What do you think? I'm happy to help get this across the line. |
Yes, It's valuable.
I am confused.
|
|
@polymona Yes, that's what I mean :) |
|
@gcanti What do you think? Is it worth to add those functions to |
Add some utility functions to
Treemodule.