Considering that valid clojure form:
> (let [a 16 b 8] (/ a b))
2
I am trying to construct it by hand in order to feed it into an eval call. I am rejected by the repl well before:
> (list 'let '[ 'a '16 'b '8 '] '(/ a b) )
RuntimeException Unmatched delimiter: ] clojure.lang.Util.runtimeException (Util.java:156)
(/ a b)
RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:156)
Quoting the array characters [] is not enough. Indeed, the following expression (removing [ and ]) is ok:
> (list 'let 'a '16 'b '8 '(/ a b) )
(let a 16 b 8 (/ a b))
What is wrong with that construction? And how can I workaround that please? Is there any special form to quote [ and ] characters?
You can quote the entire vector: