Skip to content
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

Add missing cases in fuse (empty subtrees) #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ochsnerd
Copy link

@ochsnerd ochsnerd commented Apr 7, 2024

When fusing two trees, their subtrees may be just leaves, resulting in the recursive call to fuse returning a leaf.
This case does not introduce any new logic, but has to be handled in the patterns. fixes #2

minimal example where the missing case results in an error:

delete 3 (foldr insert empty [1..4])

When fusing two trees, their subtrees may be just leaves,
resulting in the recursive call to fuse returning a leaf.
This case does not introduce any new logic, but has to be
handled in the patterns.

minimal example where the missing case results in an error:

delete 3 (foldr insert empty [1..4])
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.

Fuse pattern in red black tree
1 participant