next up previous contents index
Next: Determining the length of Up: Basic utility abstractions for Previous: Abstraction for the end   Contents   Index

Checking for an empty list: `nullp'

The abstraction `nullp' tests whether a list is empty. The list to be testet must be terminated by `nil'.

(define nullp (lambda (l)
(l (lambda (hd tl)

(define l1 (cons two (cons three nil)))
(bdisp! (nullp l1))
--> false
(bdisp! (nullp nil))
--> true

domain access counter Georg P. Loczewski 2004-03-05