Simplified Common Lisp reference
equal
Symbol class: Mathematics, Arithmetics, Logic and Comparisons
Syntax:
Symbol type: function
equalobject1object2 => T or NIL
Argument description:
object1 first object
object2 second object

EQUAL function compares same things as eql, additionally result is true under some other situations: conses are compared recursively (in both car and cdr part), string and bit-vectors are compared element-wise. Result is true if they are same, otherwise false.

(equal "moo" "moo") => T
(equal "moo" "MoO") => NIL
(equal #*1010101 #*1010101) = T
(equal (vector 2 3 4) (vector 2 3 4)) = NIL
(equal (cons 1 2) (cons 1 2)) => T
(let ((x (cons 1 2))) (equal x x)) => T
(equal 'moo 'moo) => T
(equal 'moo 'foo) => NIL
(equal 1 1) => T
(equal 1 2) => NIL
(equal 1234567890123456789 1234567890123456789) => T
(equal 1.0 1) => NIL
(equal 1.0 1.0) => T
Function indexFull documentation for equal (HyperSpec)