Skip to content

mutable recursive traversal and recursive_set method #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 27, 2025
Merged

Conversation

orxfun
Copy link
Owner

@orxfun orxfun commented Apr 17, 2025

recursive_set method is defined and implemented for NodeMut. This method provides an expressive way to update the values of a tree where value of a node is a function of its prior value and values of its children. Since the values of its children subsequently depend on their own children, it immediately follows that the value of the node depends on values of all of its descendants that must be computed to be able to compute the node's value.

In addition mutable_recursive_traversal example is created to demonstrate different ways to approach to this problem.

Fixes 159.

@orxfun orxfun marked this pull request as draft April 17, 2025 02:50
@orxfun orxfun changed the title mutable traversal example is initiated mutable recursive traversal and recursive_set method Apr 26, 2025
@orxfun orxfun marked this pull request as ready for review April 26, 2025 17:53
@orxfun orxfun merged commit 847af89 into main Apr 27, 2025
2 checks passed
@orxfun orxfun deleted the mutable-traversal branch April 27, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom (mutable) traversal is a bit hard.
1 participant