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