Computer science: LISP: ideas about true and false
Self-tutoring about Comp Sci: the tutor mentions true and false in LISP.
Note herein the difference between 0 (zero) and () (empty brackets), since they may look almost the same on some browsers.
LISP, however, seems to see it differently: anything defined as something other than nil or () is true, even if it’s defined as 0. LISP doesn’t have false; just nil. The only way to attain nil value is to be declared nil or () or else to arrive there by calculation.
In LISP, as in some other computer languages, an undefined (or undeclared) variable isn’t nil (or false); rather, the interpreter will complain when it encounters one.
So, a main thought: in LISP, (or 0 1) evaluates to 0, which is “not false”. However, (or nil) evaluates to nil, which is false, in LISP.
Source:Oracle Tutoring by Jack and Diane, Campbell River, BC.