Skip to content

Commit 6b16e1c

Browse files
committed
example is linked in the readme
1 parent e91996e commit 6b16e1c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ let remaining_bfs: Vec<_> = tree.root().walk::<Bfs>().copied().collect();
375375
assert_eq!(remaining_bfs, [1, 3, 6, 9]);
376376
```
377377

378+
### More Examples
379+
380+
* [mutable_recursive_traversal](https://github.com/orxfun/orx-tree/blob/main/examples/mutable_recursive_traversal.rs) demonstrates different approaches to achieve a recursive mutation of all nodes in the tree.
381+
378382
## Contributing
379383

380384
Contributions are welcome! If you notice an error, have a question or think something could be added or improved, please open an [issue](https://github.com/orxfun/orx-tree/issues/new) or create a PR.

examples/mutable_recursive_traversal.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// # EXAMPLE DEFINITION
22
//
3+
// cargo run --example mutable_recursive_traversal
4+
//
35
// This example demonstrates a use case where value of a node is defined
46
// as a function of the values of its children. Since the value of a child
57
// of the node also depends on values of its own children, it follows that

0 commit comments

Comments
 (0)