In programming languages, two types of and and or operators are often used. Conditional operators are called && and || in Algol languages, and in Common Lisp they are called and and or . On the other hand, the arithmetic operators & and | have the CL equivalents of logand and logior .
In Common Lisp, every value has a booleans value, and with the exception of nil every other value is considered a true value. Perl is very similar, except that it has a couple of false values, however 1 and 8 are true values ββin both languages:
1 && 8
Same thing in CL
(and 1 8) ; ==> 8 (logand 1 8) ; ==> 0 (or 1 8) ; ==> 1 (logior 1 8) ; ==> 9
source share