Re: Is there any eq t test in Common Lisp?




"John Thingstad" <john.thingstad@xxxxxxxxx> schrieb im Newsbeitrag news:op.tms6tnlzpqzri1@xxxxxxxxxxxxxxxxx
...
CL-USER 3 > (eq t t)
T

CL-USER 4 > (eq t :read-only)
NIL
...
Indeed (typep :name T) -> T
That is generalized boolean.
I take it you want binary boolean?

häääh ?!? NO - just needed the above behaviour (eq t variable) ...

... I just had library function returning either t,
:read-only or nil. I was only interested in the t case.

.... and wasn't sure if I missed something like null, not, zerop, plusp et. al..

Nothing more!


Andreas

P.S. (not (null x)) is *not* equivalent to (eq t x)!


.



Relevant Pages

  • Re: predicate
    ... Is that really supposed to be "generalized boolean" (nil and not-nil) ... letter p or ends with some other character. ... predicate n, a function that returns a value and the name of which ends ...
    (comp.lang.lisp)
  • Re: predicate
    ... Is that really supposed to be "generalized boolean" (nil and not-nil) ... non-nils do not destroy information. ... It's common to use the result of a predicate if it evaluates to true, and the most efficient way to make that happen is to pass the value that causes the predicate to evaluate to true back to the calling function. ...
    (comp.lang.lisp)
  • Re: predicate
    ... Is that really supposed to be "generalized boolean" (nil and not-nil) ... So you can use that equivalent definition: ...
    (comp.lang.lisp)
  • Re: predicate
    ... predicate n. ... Is that really supposed to be "generalized boolean" (nil and not-nil) ...
    (comp.lang.lisp)
  • predicate
    ... predicate n. ... Is that really supposed to be "generalized boolean" (nil and not-nil) ...
    (comp.lang.lisp)