EQUAL: Comparing sequences
A sequence generically refers to a list, a string, or a vector.
Numbers, symbols, and characters are EQUAL if and only if they are EQL
Two sequences are EQUAL if
- they are the same length
- they are element-by-element EQUAL
Examples
- (EQUAL ’(X (Y Z) W) ’(X (Y Z) W)) => T
- (EQUAL “AbCdE” “AbCdE”) => T
- (EQUAL “AbCdE” “aBcDe”) => NIL
EQUAL is the equality predicate of choice for strings, vectors, lists