# common-lisp Equality and other comparison predicates Overwiew

## Example

In Common Lisp there are many different predicates for comparing values. They can be classified in the following categories:

1. 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.
2. 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.
3. 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.
4. 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.
5. 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. PDF - Download common-lisp for free
{"ft_lang_label":"__label__en","ft_lang_prob":0.787385,"math_prob":0.9267171,"size":1115,"snap":"2021-31-2021-39","text_gpt3_token_len":235,"char_repetition_ratio":0.13051306,"word_repetition_ratio":0.09638554,"special_character_ratio":0.20807175,"punctuation_ratio":0.1724138,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96718943,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-26T09:47:53Z\",\"WARC-Record-ID\":\"<urn:uuid:bb287e5f-006c-4925-8ac7-66243ecf849a>\",\"Content-Length\":\"33938\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fd2e6759-27d2-46c0-bb99-6e8e1b18b20a>\",\"WARC-Concurrent-To\":\"<urn:uuid:62f39e65-d2d8-46aa-a2b8-7af2ebec3b66>\",\"WARC-IP-Address\":\"40.83.160.29\",\"WARC-Target-URI\":\"https://riptutorial.com/common-lisp/example/30883/overwiew\",\"WARC-Payload-Digest\":\"sha1:IFXEHWCV37EP3Z5LHYMPXR4B5CVZEH5X\",\"WARC-Block-Digest\":\"sha1:M4PFPVHOPT6H6E6PKSSZTRJ5EKQD77WN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057857.27_warc_CC-MAIN-20210926083818-20210926113818-00270.warc.gz\"}"}