Hi,
would it be possible to build a recursive helper for recursing on a tree-like structure?
E.G.:
{{recurse_with element.children tree}}
print something for {{element.value}}
{{/recurse_with}}
For a tree structure where
struct Tree {
value: String,
children: Vec<Tree>
}
For example? The first argument of the recurse_with helper would be a selector that gets the list of children nodes from a node.
To expand on that, I would like to implement depth-first and breadth-first recursion, but that shouldn't be too complicated if the basic helper is implemented.
Hi,
would it be possible to build a recursive helper for recursing on a tree-like structure?
E.G.:
For a tree structure where
For example? The first argument of the
recurse_withhelper would be a selector that gets the list of children nodes from a node.To expand on that, I would like to implement depth-first and breadth-first recursion, but that shouldn't be too complicated if the basic helper is implemented.