Hi,

I'm quite new to macros so forgive me if this is a naïve question, but
is it possible to write macros that are applied to an entire Clojure
program?

The reason I ask is that, in other threads in this group, some simple
transformations to improve efficiency of Clojure programs were
mentioned. In particular, it seems converting `(+ 1 2 3)` to `(+ 1 (+
2 3))` can speed things up. Applying such a transformation to my own
code would be a mindless pattern matching job, and thus perfect for
automation.

Any suggestions how I might write a Clojure program that takes as
input another Clojure program and outputs a third one that is
optimised but semantically equivalent to the input? Are macros the
right tool for the job in this case?

Thanks,

Mark.
--
http://mark.reid.name
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to