Subject: Re: ANDF, ORF functions instead of macros
From: (Rob Warnock)
Date: Sun, 02 Dec 2007 03:28:30 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Kent M Pitman  <> wrote:
| probably want to introduce your own
| SAME-BOOLEAN-VALUE predicate so you can do 
|  (same-boolean-value (...some-predicate...) (...some-other-predicate...))
| or else you want a coercer from generalized boolean values to 
| boolean values, such as a BOOLEAN or TRUE? function that returns only a
| strict boolean, so you can do:
|  (eq (true? (...some-predicate...)) (true? (...some-other-predicate...)))

I call such a coercion simply TRUTH, e.g.:

   (eq (truth (...some-predicate...)) (truth (...some-other-predicate...)))

One relatively cheap definition:

   (define truth (generalized-boolean)
     (not (not generalized-boolean)))


   (define truth (generalized-boolean)
     (if generalized-boolean t nil))

Which is cheaper may depend on your compiler and/or the amount of
work you put into writing an associated compiler macro for it...  ;-}


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607