You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I try to insert a child on a leaf node, from a list zipper, treepy throws an error: "Called children on a leaf node", e.g.
(let* ((l '())
(z (treepy-list-zip l))
(z (treepy-insert-child z 1))
(z (treepy-insert-child z 2))
(z (treepy-down z))
(z (treepy-insert-child z 3))
)
z)
Your tests show how to use a zipper created from an existing list. The much more common case would seem to be you start with an empty zipper, then add and remove things as needed. But how can you do that if you can't insert on a leaf node? How does clojure handle that?
The text was updated successfully, but these errors were encountered:
If I try to insert a child on a leaf node, from a list zipper, treepy throws an error: "Called children on a leaf node", e.g.
Your tests show how to use a zipper created from an existing list. The much more common case would seem to be you start with an empty zipper, then add and remove things as needed. But how can you do that if you can't insert on a leaf node? How does clojure handle that?
The text was updated successfully, but these errors were encountered: