Page 357
endp
Graham's notation correctly but perhaps too subtly conveys an
important distinction between endp
and
null
:
null
tests for an empty list.endp
tests if a list is empty.
What's the difference? endp
will signal an error if
passed a non-list. null
won't.
This actually makes endp
a better test in most loops
that step through a list, because it will catch non-lists
immediately.
endp
is a relatively recent addition to Lisp and is
underutilized by almost everyone, including myself.