On 11 Feb 2011, at 03:15, Ken Wesson wrote:
(defmacro macrolet [fnspecs & body]
`(macrolet* #{} ~fnspecs ~@body))
See also clojure.contrib.macro-utils/macrolet:
https://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/macro_utils.clj
It has both macrolet and symbol-macrolet. Like your version, it works
by fully expanding the form supplied to it. However, the concrete
algorithm looks very different from yours.
This implementation may have a few unhandled edge cases. If you find
any, let me know.
At first glance, it seems that there are few more special forms that
need special treatment. I see fn*, let*, loop*, and try, but there is
also deftype* and reify* that have peculiar requirements, and
depending on how your algorithm works in detail, you also must
consider quote, var, def and new specially.
Konrad.
--
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