On Tue, Feb 21, 2012 at 10:32 AM, Meikel Brandmeyer (kotarak) <m...@kotka.de> wrote: > Hi, > > I'm not sure it nicer, but anyway... > > It follows a similar approach as Cedric: pass down unbox info and collect up > constants info. However I use the form itself to carry additional > information. YMMV. One could also put info into meta.
I'd actuallly tried to avoid littering the syntax tree with :constants elements anywhere other than where they were needed, but thinking about it, there doesn't really seem to be any reason to do that, and it does make the implementation much simpler. > (defn processor > [pre-fns post-fns] > (fn this [form] > (let [form (reduce call form pre-fns) > form (maybe recursive? update-children form this)] > (reduce call form post-fns)))) This is really neat, setting up the processor up front with the processing functions will work much better than my current overloading scheme. It's also cool how this provides for a list of pre and post fns. I'd initially tried to do this but backed off from it as over-complicated. Thanks, Aaron -- 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