Hi,
Am 26.05.2009 um 20:47 schrieb kyle smith:
Ahh, of course. I've actually learned that trick before. Thanks.
There is also the mega-hacky quasiquote macro:
(defn- self-eval?
[thing]
(or (keyword? thing)
(number? thing)
(instance? Character thing)
(string? thing)
Ahh, of course. I've actually learned that trick before. Thanks.
--~--~-~--~~~---~--~~
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
I would lead the desired term with ~'
For example:
`(+ 1 2)
=> (clojure.core/+ 1 2)
`(~'+ 1 2)
=> (+ 1 2)
This is very useful when defining a function in a macro
On May 26, 2:30 pm, kyle smith wrote:
> user> (def nums '(1 2 3))
> #'user/nums
> user> (def funs '((+ (1 2 3)) (- (1 2 3
> #'
Hi Kyle,
This will work:
`((~'+ ~nums) (~'- ~nums))
Hope this helps
-Patrick
--~--~-~--~~~---~--~~
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 unsubscr
user> (def nums '(1 2 3))
#'user/nums
user> (def funs '((+ (1 2 3)) (- (1 2 3
#'user/funs
user> funs
((+ (1 2 3)) (- (1 2 3)))
user> (def funs `((+ ~nums) (- ~nums)))
#'user/funs
user> funs
((clojure.core/+ (1 2 3)) (clojure.core/- (1 2 3)))
I would expect these two approaches to be the same,