ah, i haven't found a great use case for zippers yet either. but
lately I've been experimenting with using them to write more readable
code transforms. hence the need for form-zip.
Like clojure.walk, but with the ability to backtrack.
> fz-node-seq doesn't seem useful.
O
m, George Jahad wrote:
>
> > > surely this one's been written before, but i needed it the other day
> > > and couldn't find it.
>
> > > form-zip returns a zipper from a clojure form.
>
> > > user=> (require '[clojure.zip :as zip])
> > &
(fz-node-seq x) is just (tree-seq coll? seq x) then, yeah? I could see
form-zip being useful for people who like zippers (personally I don't
have enough experience to be comfortable with them), but fz-node-seq
doesn't seem useful.
On Nov 1, 8:56 pm, George Jahad wrote:
> surely th
ing?
>
> On Nov 1, 8:56 pm, George Jahad wrote:
>
>
>
>
>
>
>
> > surely this one's been written before, but i needed it the other day
> > and couldn't find it.
>
> > form-zip returns a zipper from a clojure form.
>
> > user=> (re
ay
> and couldn't find it.
>
> form-zip returns a zipper from a clojure form.
>
> user=> (require '[clojure.zip :as zip])
> user=> (use 'form-zip.core)
> user=> (-> '{1 2 3 4} form-zip zip/next zip/remove zip/root)
> {3 4}
>
> fz-
surely this one's been written before, but i needed it the other day
and couldn't find it.
form-zip returns a zipper from a clojure form.
user=> (require '[clojure.zip :as zip])
user=> (use 'form-zip.core)
user=> (-> '{1 2 3 4} form-zip zip/next zip/remove z