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




"John Thingstad" <john.thingstad@xxxxxxxxx> schrieb im Newsbeitrag news:op.tmscg2hnpqzri1@xxxxxxxxxxxxxxxxx
...
Generally yes, but I just had library function returning either t,
:read-only or nil. I was only interested in the t case.
...

or just (when x ..)
Some frown at this and prefer (when (not (null x)) ..),
but I like generalised boolean.
...

CL-USER 1 > (not (null t))
T

CL-USER 2 > (not (null :read-only))
T

CL-USER 3 > (eq t t)
T

CL-USER 4 > (eq t :read-only)
NIL

?

Andreas

.



Relevant Pages

  • Re: Is there any eq t test in Common Lisp?
    ... IMO it's bad programming practice to rely on somebody else's module ... ((NIL:READ-ONLY) ... (defun library:fun (x) ... the meaning the library function gives to the returned value matches ...
    (comp.lang.lisp)
  • Re: Noob question I think
    ... so I get and error that says nil is not of type NO. ... CL-USER> pai linha coluna id-nr) ... CL-USER> (defun insereMP (abertos no) ...
    (comp.lang.lisp)
  • Re: #0= ... #0#
    ... (do ((line (read-line stream nil nil) ... CL-USER> &body code) ... CL-USER> (write (macroexpand-1 form) ... The macro has built a confluent data structure. ...
    (comp.lang.lisp)
  • Re: Is there any eq t test in Common Lisp?
    ... (defun t-p (x) ... Generally yes, but I just had library function returning either t,:read-only ... T isn't nearly as special as NIL or 0. ... Barry Margolin, barmar@xxxxxxxxxxxx ...
    (comp.lang.lisp)
  • Re: How to eliminate eval?
    ... CL-USER> ) ... NIL)) ) ... CL-USER> (create-parameter 'a nil) ... (create-parameter (intern var) ...
    (comp.lang.lisp)