Tutorial by Examples

EQ checks if two values have the same address of memory: in other words, it checks if the two values are are actually the same, identical object. So, it is can be considered the identity test, and should be applied only to structures: conses, arrays, structures, objects, typically to see if you ...
These three operators implement structural equivalence, that is they check if different, complex objects have equivalent structure with equivalent component. EQUAL behaves like EQL for non-structured data, while for structures built by conses (lists and trees), and the two special types of arrays, ...
Numeric values can compared with = and the other numeric comparison operators (/=, <, <=, >, >=) that ignore the difference in the physical representation of the different types of numbers, and perform the comparison of the corresponding mathematical values. For instance: (= 42 42) T ;...
Common Lisp has 12 type specific operators to compare two characters, 6 of them case sensitives and the others case insensitives. Their names have a simple pattern to make easy to remember their meaning: Case SensitiveCase InsensitiveCHAR=CHAR-EQUALCHAR/=CHAR-NOT-EQUALCHAR<CHAR-LESSPCHAR<=CHA...
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: =...

Page 1 of 1