Is this 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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With