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
March 2007