Re: clojure.zip/goto proposal

2008-10-18 Thread Meikel Brandmeyer
Hi, Am 16.10.2008 um 23:07 schrieb Meikel Brandmeyer: I'll will mull a bit more about this. But something along the lines of (goto loc some-predicate path) seems like it could do what it want. Ok. The attached patch is what I came up with. It is actually split up in two functions walk-along-a

Re: clojure.zip/goto proposal

2008-10-16 Thread Meikel Brandmeyer
Hi, Am 16.10.2008 um 20:20 schrieb Chouser: actually want to use in navigation, "filename" or whatever. Perhaps you could simply pass in a filter function to your original goto, to allow partial application-specific comparisons. I had a look in clojure.contrib.zip-filter.xml. I think it works

Re: clojure.zip/goto proposal

2008-10-16 Thread Chouser
On Thu, Oct 16, 2008 at 2:10 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > > So I need some external way of navigation. Maybe one can also > provide a function how to compare nodes. ad-hoc trees like > [1 [2 3] [[[4 5] 6] 7 8]] then only have identical? as a predicate, > which does not compar

Re: clojure.zip/goto proposal

2008-10-16 Thread Meikel Brandmeyer
Hello, Am 16.10.2008 um 16:56 schrieb Chouser: >> I'd like to propose a clojure.zip/goto function. It is basically >> the inverse of the clojure.zip/path function, ie. it takes a >> location and a path and walks through the zipper to the given >> node and returns its loc. Wouldn't each step of

Re: clojure.zip/goto proposal

2008-10-16 Thread Chouser
On Thu, Oct 16, 2008 at 10:42 AM, mb <[EMAIL PROTECTED]> wrote: > > I'd like to propose a clojure.zip/goto function. It is basically > the inverse of the clojure.zip/path function, ie. it takes a > location and a path and walks through the zipper to the > given node and returns its loc. Wouldn't