Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!cornell!oravax!klapper From: klapper@oravax.UUCP (Carl Klapper) Newsgroups: comp.lang.lisp Subject: Re: FALSE vs empty list Summary: lisp booleans are just plain weird Message-ID: <1646@oravax.UUCP> Date: 7 Sep 90 15:57:52 GMT References: <24305@uflorida.cis.ufl.EDU> <1350029@otter.hpl.hp.com> Organization: Odyssey Research Associates, Ithaca NY Lines: 42 In article <1350029@otter.hpl.hp.com>, sfk@otter.hpl.hp.com (Steve Knight) writes: > If you are happy applying boolean operators to lists and list operators to > booleans, then you will have little inclination to change. You may even > enjoy the conciseness of idioms such as > (car (or (member x L1) (member x L2) '(()))) > which exploit the conflation of lists and booleans. or even ... (defvar list-where-found nil) (defun member-note-list (x l) (let ((member-list (member x l))) (when member-list (setq list-where-found l) member-list))) (setf (car (or (member-note-list x L1) (member-note-list x L2) '(()))) list-where-found) (and (member-note-list x L3) (member-not-list x list-where-found)) which exploit the execution sequences of OR and AND. Clearly, lisp booleans and boolean operators diverge from mathematical booleans and boolean operators. BTW, my preferences for TRUE and FALSE are : TRUE #s(AND :ARGS NIL) FALSE #s(OR :ARGS NIL) +-----------------------------+--------------------------------------------+ | Real urbanites don't buy | Carl Klapper | | things. They buy service. | Odyssey Research Associates, Inc. | | | 301A Harris B. Dates Drive | | A kitchen's place is | Ithaca, NY 14850 | | in the restaurant. | (607) 277-2020 | | | klapper%oravax.uucp@cu-arpa.cs.cornell.edu | +-----------------------------+--------------------------------------------+