From reading introductory material on Lisp, I now consider the following to be identical:
(list 1 2 3)
\'(1 2 3)
However, judging from pro
The primary difference is that quote prevents evaluation of the elements, whereas list
does not:
user=> '(1 2 (+ 1 2)) (1 2 (+ 1 2)) user=> (list 1 2 (+ 1 2)) (1 2 3)
For this reason (among others), it is idiomatic clojure to use a vector when describing a literal collection:
user=> [1 2 (+ 1 2)] [1 2 3]