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

Ecstatic Earthworm - error in text on PDF page 169 #13

Closed
gregspurrier opened this issue Sep 4, 2012 · 1 comment
Closed

Ecstatic Earthworm - error in text on PDF page 169 #13

gregspurrier opened this issue Sep 4, 2012 · 1 comment

Comments

@gregspurrier
Copy link

In "The Trickiness of Removing" on page 169 of the PDF version of Ecstatic Earthworm, there is either an error in the text or I am confused about what you are trying to convey:

Remember that zip/next moves depth-first, not breadth-first. The next node after (+ 1 HERE) is 1, not (2 3).

From the example that is in play, I would expect this to say "The next node after (+ 1 HERE) is +, not (2 3)." since the depth-first walk would take you into the seq at the left-most position. I've confirmed this with the REPL:

user=> (def zipper (zip/seq-zip '((+ 1 HERE) (+ 2 3))))
#'user/zipper
user=> (-> zipper zip/down zip/node)
(+ 1 HERE)
user=> (-> zipper zip/down zip/next zip/node)
+

This is using the original zipper, not the one resulting from the removal, but I see the same thing with the latter as well.

@marick
Copy link
Owner

marick commented Sep 13, 2012

You're correct. Fixed.

@marick marick closed this as completed Sep 13, 2012
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

No branches or pull requests

2 participants