In Feb 1, 2:32 am, e <evier...@gmail.com> wrote: > I don't understand this: (def z (zip/zipper rest rest cons t))
>From the API docs on zipper: (zipper branch? children make-node root) The branch? predicate is rest, because if a node has children, then rest will not be nil, and therefore true. The children predicate is also rest, because that's how the children are stored. make-node takes a node and some children, and creates a branch. That's cons because (cons :c '(:e :f)) is (:c :e :f), which is what we want. > Also, it didn't make sense why down arbitrarily brought you to the left > child. Why wouldn't you have to say, "down-left"? Because that's how down is defined. Check the docs: (down loc) Returns the loc of the leftmost child of the node at this loc - James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---