- Code: Select all
(consp (cons 1 1))
> t
- Code: Select all
(listp (cons 1 1))
>t
- Code: Select all
(consp (list 1 1))
>t
- Code: Select all
(listp (list 1 1))
>t
- Code: Select all
(nth 1 (cons 1 1))
> error not a list
(consp (cons 1 1))
(listp (cons 1 1))
(consp (list 1 1))
(listp (list 1 1))
(nth 1 (cons 1 1))
(defun true-list-p (list)
(cond ((null list) t)
((consp list) (true-list-p (cdr list)))
(t nil)))
Users browsing this forum: No registered users and 2 guests