开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜