Otherwise (if they are direct instances of the same class but not eql), the result is t if one of the following cases applies: lists: either obj 1 and obj 2 are both the empty list (i.e., nil), or (and (equal (car obj1) (car obj2)) (equal (cdr obj1) (cdr obj2))) holds; basic arrays: (equal (array-dimensions obj 1 ) (array-dimensions obj 2 )) holds and for every valid reference (aref obj 1 ind 1...ind n ) (equal (aref obj 1 ind 1 … ind n ) (aref obj 2 ind 1 … ind n )) is satisfied.
(equal 'a 'a) ⇒ t (equal 2 2) ⇒ t (equal 2 2.0) ⇒ nil (equal '(a) '(a)) ⇒ t (equal '(a (b) c) '(a (b) c)) ⇒ t (equal (cons 1 2) (cons 1 2)) ⇒ t (equal '(a) (list 'a)) ⇒ t (equal "abc" "abc") ⇒ t (equal (vector 'a) (vector 'a)) ⇒ t (equal #(a b) #(a b)) ⇒ t (equal #(a b) #(a c)) ⇒ nil (equal "a" "A") ⇒ nil Logical connectives ( not obj ) → boolean This predicate is the logical “not” (or “”).