Re: clojure.zip and root

2009-07-20 Thread B Smith-Mannschott
On Mon, Jul 20, 2009 at 12:33, kyle smith wrote: > >> At the moment "root" works like an "unzip". What you want it is some >> kind of "up-till-root" shortcut. > Yep. For now, I've added root-loc to my local copy of clojure, > although I second the name unzip. Hmm, though this is actually precisel

Re: clojure.zip and root

2009-07-20 Thread kyle smith
> At the moment "root" works like an "unzip". What you want it is some > kind of "up-till-root" shortcut. Yep. For now, I've added root-loc to my local copy of clojure, although I second the name unzip. > > It would also be nice if the docs mentioned that a loc is a vector of > > [node path]. > >

Re: clojure.zip and root

2009-07-20 Thread Meikel Brandmeyer
Hi, On Jul 20, 10:35 am, kyle smith wrote: > I'm trying to learn how to use zippers, and I have some thoughts:  Why > does (root loc) return a node, rather than just the location of the > root?  If the latter were true and you wanted the node, you could just > call (node (root loc)).  As it is,

clojure.zip and root

2009-07-20 Thread kyle smith
I'm trying to learn how to use zippers, and I have some thoughts: Why does (root loc) return a node, rather than just the location of the root? If the latter were true and you wanted the node, you could just call (node (root loc)). As it is, once you call (root loc), you lose the reference to t