On Oct 31, 2011, at 5:40 AM, vikbehal wrote: > I am from java Background. We say Homoiconicity in Clojure (Lisp). > Code is data and data is code. I read various blogs on it, still not > clear, Can you give me some example?
FWIW I think that homoiconicity can be useful in a variety of circumstances even when macros aren't involved. I work with genetic programming, in which code is generated randomly, tested, mutated, recombined, etc. Doing this in a homoiconic language is particularly elegant. A very simple example that I wrote in Clojure for a class that I'm teaching is at: https://gist.github.com/1297325 (Many of you will notice that I could have written "inject" and "extract" more simply with zippers or clojure.walk; I avoided them here, and did some other things in the way that I did, for pedagogical reasons.) -Lee -- 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