2012/2/21 Aaron Cohen <aa...@assonance.org> > Hi all, > > After a good deal of effort, I managed to beat the following code > into something functional, but it's getting kind of big, unwieldy and > hard to follow. > > I'd appreciate if anyone could take a look and give me some pointers. > > First, it will probably be easier for me to describe what is > supposed to happen. > > Given an ast, which can be approximated as: {:op :fn, :children [{:op > :let, :children [{:op :constant, :form 1}]}]} > > I would like to process the ast such that: > 1) Any nodes that are of :op :fn, get an entry added named > ":constants" which contains a vector of all the constants found in any > of their children > 2) Any nodes that are a child of an :op :let node, get an additonal > element ":unbox true". In particular, the let node must not get :unbox > true, but may get :unbox nil or false if it's easier. > > I have the extracted function at the following gist: > https://gist.github.com/1876575 >
Sounds like an interesting potential addition to 4clojure > > 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 -- 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