In Common Lisp there are many different predicates for comparing values. They can be classified in the following categories:
- Generic equality operators: EQ, EQL, EQUAL, EQUALP. They can be used for values of any type and return always a boolean value T or NIL.
- Type specific equality operators: = and = for numbers, CHAR= CHAR= CHAR-EQUAL CHAR-NOT-EQUAL for characters, STRING= STRING= STRING-EQUAL STRING-NOT-EQUAL for strings, TREE-EQUAL for conses.
- Comparison operators for numeric values: <, <=, >, >=. They can be applied to any type of number and compare the mathematical value of the number, independently from the actual type.
- Comparison operators for characters, like CHAR<, CHAR-LESSP, etc., that compare characters either in a case sensitive way or in a case insensitive way, according to an implementation depending order that preserves the natural alphabetical ordering.
- Comparison operators for strings, like STRING<, STRING-LESSP, etc., that compare strings lexicographically, either in a case sensitive way or in a case insensitive way, by using the character comparison operators.