Clojure: "=" compares values in collections, why cannot it compare two lists in this case?

Viewed 394

See this example:

Clojure 1.4.0
user=> (def a 1)
#'user/a
user=> (def b 2)
#'user/b
user=> (= [1 2] [a b])
true
user=> (= '(1 2) '(1 2))
true
user=> (= '(1 2) '(a b))
false

Why the last case does not work, and how do I make the last case work without having to convert list to vector?

Thank you!

1 Answers
Related