I discussed prewalk and postwalk with a another Clojure user that I am friends with. He sent me the following, via email, this morning:
I have a workaround/solution for you. I still don't know exactly why, but the :else clause in walk calls outer on form. This will give you all sorts of class cast exceptions if you only wanted to apply the function to each element individually. With that said, just wrap your function with another that ignores any sequential structures. (defn ignore-sequential [f] #(if (sequential? %) % (f %))) user> (prewalk (ignore-sequential inc) [1 [2] 3]) [2 [3] 4] user> (postwalk (ignore-sequential inc) [1 [2] 3]) [2 [3] 4] -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.