next up previous
Contents Next: numberp (PREDICATE) Up: Appendix: Selected LISP Previous: nthcdr (FUNCTION)

null (PREDICATE)

Format: (null <exp>)

Required arguments: 1

<exp>: any LISP expression

The predicate null returns T if <expr> evaluates to the empty list; NIL otherwise. null is just the same as not, but is the preferred form to use when the purpose is to test whether a list is empty.

Examples:

>(null '(picard riker))
NIL

>(null (rest '(picard)))
T



© Colin Allen & Maneesh Dhagat
November 1999