Re: form-zip

2011-11-09 Thread George Jahad
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

Re: form-zip

2011-11-09 Thread George Jahad
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]) > > &

Re: form-zip

2011-11-08 Thread Alan Malloy
(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

Re: form-zip

2011-11-08 Thread Alan Malloy
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

Re: form-zip

2011-11-08 Thread George Jahad
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-

form-zip

2011-11-01 Thread George Jahad
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