Are there any procedures that operate specifically on the empty list?
There's the type predicate
null?, which takes one argument and determines whether its
operand is the empty list, returning the true Boolean value if it is and
the false one if it is not:
In addition, there are a number of procedures that operate on lists, and most of them accept the empty list as an argument.> (null? '()) #t > (null? '(3)) #f > (null? (cons 1 2)) #f > (null? (cdr '(3))) #t > (null? (cdr (cons 3 '()))) #t
Next topic
Previous topic
Table of contents
This document is available on the World Wide Web as
http://www.math.grin.edu/~stone/scheme-web/null-ques.html