Re: An Acceptable Lisp



Pascal J. Bourguignon wrote:
What about basic data types; what about the type system itself?
This is covered by the Special Operator THE ;-)
ATOM?

(THE ATOM 42)

Ok, with handler-bind (and the corresponding evaluator-internal
primitive), it can work (you'll have to catch the error that occurs for
non-atoms and return nil in that case.)
.



Relevant Pages

  • Re: `(,@10)
    ... This case "may" be reduced to one involving (quote nil). ... Since most of the forms are ``lifted'' into the domain of one element lists, ... need CAR to reduce one of them back down, to get an atom for the dot position. ... NIL) case is handled too, since (CAR `,NIL) is NIL. ...
    (comp.lang.lisp)
  • Re: The empty list and the end of a list
    ... thus spoke Pascal Bourguignon: ... I undersand that is the same as ', nil and 'nil and that it is of ... type list, atom and symbol at the same time, but that doesn't help me ...
    (comp.lang.lisp)
  • Re: Newbie list traversal
    ... > (traverse-list (cdr list))) ... but the "T" clause should never be reached. ... because everything is either an ATOM or a CONS, ... is an atom other than NIL. ...
    (comp.lang.lisp)
  • Re: destructuring-bind on infinite lists?
    ... A destructuring pattern can contain CAR leaves which are NIL. ... possible that a structure mismatch will occur against these, ... The 1 in the data is matched by which is the atom NIL, ...
    (comp.lang.lisp)
  • Re: Remove every atom
    ... I'm still new to Lisp. ... (defun delete-in (e l) ... Since E is supposedly an atom and L is a list, ...
    (comp.lang.lisp)