They have a different make-node function, so that when you edit a vector-zip you get vectors instead of something else. It's also easy to imagine your "data units" are simple vectors, grouped together in some kind of list structure. Then you would want the zipper to tell you "hey, this node is a leaf" for vectors - thus seq-zip.
On Nov 8, 7:21 pm, George Jahad <[email protected]> wrote: > Now that I think of it, why are seq-zip and vector-zip separate > functions? Why not a single function that handles both seq and > vectors, and sets and maps too? > > What am I missing? > > On Nov 1, 8:56 pm, George Jahad <[email protected]> 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]) > > user=> (use 'form-zip.core) > > user=> (-> '{1 2 3 4} form-zip zip/next zip/remove zip/root) > > {3 4} > > > fz-node-seq returns a seq of the nodes. > > > user=> (fz-node-seq '{1 2 3 4}) > > ({1 2, 3 4} [1 2] 1 2 [3 4] 3 4) > > > a one hour hack, probably full of edge cases i haven't thought of. > > > on clojars and github:https://github.com/GeorgeJahad/form-zip -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
