From: JTK <je...@gm...> - 2015-06-26 00:04:19
|
Apologies if this is an inane question, but is the following intended? cl-user> (lisp-implementation-version) "1.2.11" cl-user> (sxhash #(2)) 1193941381096739655 cl-user> (sxhash #(1 2)) 1193941381096739655 cl-user> (sxhash #(3 1 2)) 1193941381096739655 cl-user> (sxhash #()) 1193941381096739655 cl-user> (sxhash (vector "bunny")) 1193941381096739655 Admittedly, it conforms with CLHS http://www.lispworks.com/documentation/lw61/CLHS/Body/f_sxhash.htm <http://www.lispworks.com/documentation/lw61/CLHS/Body/f_sxhash.htm> It comes from target-sxhash.lisp where (array ;; case of array (typecase x (simple-string (sxhash x)) ; through DEFTRANSFORM ;;; falls through to here (t (logxor 191020317 (sxhash (array-rank x)))))) So every 1d array has the same sxhash. Is there a reason the first few elements aren’t used, like for a list? |