Hi,
My target is to have something like this:
(servlet "ArticlesServlet"
(do-get [this request response]
(println "Get Request"))
(do-post [this request response]
(println "Post Request")))
I started with this:
(defmacro servlet [servlet-name meths]
`(reify Servlet
(for [meth ~@meths]
(let [[method-name params & body] meth
camel-case-method-name (hyphenated->camel-case method-name)]
(~camel-case-method-name ~@body)))))
But of course, it is not working :)
I get:
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
camel-case-method-name in this context
Why?
And of course, feel super free to correct my Macro :)
Thanks for help and time.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.