(equal (vector ()()()) (vector ()()()) returns t
Why CMU/CL returns nil ?
And how can I compare direcly, of course, two vectors ?
Thank you for yours answer
Philippe.
--
------------------------------------------------------------------------
Philippe DEJEAN INSTITUT DE RECHERCHE EN
INFORMATIQUE DE TOULOUSE
e-mail : dej...@irit.fr Pole 2IST
Tel : (33 5) (05) 61 55 63 09 Equipe TCI
Fax : (33 5) (05) 61 55 62 58
http://www.irit.fr/~Philippe.Dejean
------------------------------------------------------------------------
because it implements Common Lisp.
| And how can I compare direcly, of course, two vectors?
use `equalp'.
#\Erik
--
if you think big enough, you never have to do it
(vector () () ()) returns a piece of memory holding three pointers.
[The three pointers all point to nil, but that's not important
here.] The second call to (vector () () ()) returns a
**different** piece of memory holding three pointers. Since
the two pieces of memory are not exactly the same object,
"equal" returns nil.
As Steele's book says, "Two arrays are equal only if they are
eq, with one exception: strings and bit-vectors..."
equalp will do what you want.