y - an object.
generalized-boolean - a generalized boolean.
If two characters are char-equal.
If two numbers are the same under =.
If the two cars in the conses are equalp and the two cdrs in the conses are equalp.
If two arrays have the same number of dimensions, the dimensions match, and the corresponding active elements are equalp. The types for which the arrays are specialized need not match; for example, a string and a general array that happens to contain the same characters are equalp. Because equalp performs element-by-element comparisons of strings and ignores the case of characters, case distinctions are ignored when equalp compares strings.
If two structures S1 and S2 have the same class and the value of each slot in S1 is the same under equalp as the value of the corresponding slot in S2.
equalp descends hash-tables by first comparing the count of entries and the :test function; if those are the same, it compares the keys of the tables using the :test function and then the values of the matching keys using equalp recursively.
equalp does not descend any objects other than the ones explicitly specified above. The next figure summarizes the information given in the previous list. In addition, the figure specifies the priority of the behavior of equalp, with upper entries taking priority over lower ones.
Summary and priorities of behavior of
(equalp 'a 'b) false
(equalp 'a 'a) true
(equalp 3 3) true
(equalp 3 3.0) true
(equalp 3.0 3.0) true
(equalp #c(3 -4) #c(3 -4)) true
(equalp #c(3 -4.0) #c(3 -4)) true
(equalp (cons 'a 'b) (cons 'a 'c)) false
(equalp (cons 'a 'b) (cons 'a 'b)) true
(equalp #\A #\A) true
(equalp #\A #\a) true
(equalp "Foo" "Foo") true
(equalp "Foo" (copy-seq "Foo")) true
(equalp "FOO" "foo") true
(setq array1 (make-array 6 :element-type 'integer
:initial-contents '(1 1 1 3 5 7)))
#(1 1 1 3 5 7)
(setq array2 (make-array 8 :element-type 'integer
:initial-contents '(1 1 1 3 5 7 2 6)
:fill-pointer 6))
#(1 1 1 3 5 7)
(equalp array1 array2) true
(setq vector1 (vector 1 1 1 3 5 7)) #(1 1 1 3 5 7)
(equalp array1 vector1) true