On Mar 28, 1:59 pm, "ke...@ksvanhorn.com"
wrote:
> I'm in the process of learning Clojure, and I ran across something
> that other newbies like me may find useful. The question I had was
> this: how does one get a method name into a macro? Consider the
> following code:
>
> (defmacro foo [x
Another way to handle it would be to use the alternate syntax for
static methods:
(defmacro foo [x] `(Character/isWhitespace ~x))
which would expand properly. Using the dot form for instance methods,
i.e. (.method obj) should also keep syntax quote from expanding it
improperly.
On Mar 28, 12:5
Your solution is the accepted one ;)
On Sat, Mar 28, 2009 at 1:59 PM, ke...@ksvanhorn.com wrote:
>
> I'm in the process of learning Clojure, and I ran across something
> that other newbies like me may find useful. The question I had was
> this: how does one get a method name into a macro? Cons
I'm in the process of learning Clojure, and I ran across something
that other newbies like me may find useful. The question I had was
this: how does one get a method name into a macro? Consider the
following code:
(defmacro foo [x] `(. Character (isWhitespace ~x)))
Yes, I know that this woul