PPT Slide
TESTING FOR NIL
null
Null is the predicate that tests for NIL.
( null x ) returns
T if x is NIL
NIL if x is nonNIL
endp
Endp does the same thing but sounds better when testing for end of a list.
( cond
( ( endp L ) 0 )
( T ( 1+ ( length ( cdr L ) ) ) ) )
1.31
Previous slide
Next slide
Back to first slide
View graphic version