Re: quote vs quasiquote

2009-05-26 Thread Meikel Brandmeyer
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)

Re: quote vs quasiquote

2009-05-26 Thread kyle smith
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

Re: quote vs quasiquote

2009-05-26 Thread Sean Devlin
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 > #'

Re: quote vs quasiquote

2009-05-26 Thread CuppoJava
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

quote vs quasiquote

2009-05-26 Thread kyle smith
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,