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

fix: treepy-leftmost, treepy-rightmost #17

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

Conversation

jepsoniada
Copy link

The Issue

Functions treepy-leftmost and treepy-rightmost doesn't represent left and right hand side like treepy-left or treely-right does.
This affects reconstruction of data whenever it's changed.
Most affected is treepy-rightmost as it reverses whole lhs when going back to root.

Example

(let ((data (treepy-list-zip (list 1 2 (list 3 4)))))
  (treepy-root (treepy-append-child (treepy-rightmost (treepy-down data)) 5)))
;; return (2 1 (3 4 5))
;; expected (1 2 (3 4 5))

What's Changed

Provided patch brings behavior of these function closer to their less specialized counterparts and adds lacking test coverage for them.

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.

1 participant