This repository was archived by the owner on Dec 24, 2022. It is now read-only.
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
bug in findFromRoot
#4
Open
Description
Hi I've been using your library a bit and I like it! In using it I think I've found a bug. If you run findFromRoot
for 7
on the sampleTree in your tests (https://github.com/dmbfm/purescript-tree/blob/master/test/Main.purs#L27) the value won't be found. I spent some time trying to fix the bug today, and I found a tentative solution, but realized afterward that fromTree
does not work the way I expected it to, so while my solution found the value, the resulting Loc
was broken. I thought it might be easier for you to fix since you understand the code better than I do. Also I'm not sure findUp
and findDown
work correctly. Neither will find 7
when starting from the top or bottom of the tree.
TIA
Metadata
Metadata
Assignees
Labels
No labels