Clojure unquote '(1 2 (+ 1 2))

How can I refuse the following content:

(def a '(1 2 (+ 1 2))) 

For him to rate:

 (1 2 3) 

Performance:

 (def a '(1 2 ~(+ 1 2))) 

evaluated as indicated in REPL:

 (1 2 (clojure.core/unquote (+ 1 2))) 

I know what I can do:

 (list 1 2 (+ 1 2)) 

But I was wondering if there could be any syntax for this purpose.

+4
source share
1 answer

Use instead. Unquoting does not work with ' .

+8
source

All Articles