Why does (= (vector nil) (vec nil)) return false?
Is 开发者_StackOverflowthis just a quirk, or is there some fundamental concept that implies this?
vec converts into a vector(nil becomes an empty vector) while vector creates a vector with the given elements.
(vec nil) => []
(vector nil) => [nil]
you could have entered these expressions into a repl to see their results and why they're not equal.
user> (vec nil) ; => []
user> (vector nil) ; => [nil]
user> (= *1 *2) ; => false
Why should these be equal?
精彩评论