|
SketchyLISP Reference |
Copyright (C) 2007 Nils M Holm |
| <<[list-tail] | [Index] | [map]>> |
Conformance: R5RS Scheme
Purpose:
Check whether a datum is a (proper) list.
Proper lists are:
'(), (cons X '()), (cons Y (cons X '())), ...
Arguments:
X - datum
Implementation:
(define (list? x)
(or (null? x)
(and (pair? x)
(list? (cdr x)))))
Example:
(list? '(a b c)) => #t
| <<[list-tail] | [Index] | [map]>> |