Previous: Type Predicates, Up: Predicates

### 4.2 Equality Predicates

This package defines the Common Lisp predicate `equalp`.

— Function: equalp a b

> This function is a more flexible version of `equal`. In particular, it compares strings case-insensitively, and it compares numbers without regard to type (so that `(equalp 3 3.0)` is true). Vectors and conses are compared recursively. All other objects are compared as if by `equal`.

> This function differs from Common Lisp `equalp` in several respects. First, Common Lisp's `equalp` also compares characters case-insensitively, which would be impractical in this package since Emacs does not distinguish between integers and characters. In keeping with the idea that strings are less vector-like in Emacs Lisp, this package's `equalp` also will not compare strings against vectors of integers.

Also note that the Common Lisp functions `member` and `assoc` use `eql` to compare elements, whereas Emacs Lisp follows the MacLisp tradition and uses `equal` for these two functions. In Emacs, use `member*` and `assoc*` to get functions which use `eql` for comparisons.