Plaster
New
List
Login
common-lisp
default
anonymous
2020.07.06 22:56:06
(defun type= (l) (if (cdr l) (if (eq (type-of (car l)) (type= (cdr l))) (type-of (car l)) nil) (type-of (car l)))) (deftype list-of (type) `(and (cons ,type *) (satisfies type=))) (typep '(a b c d) '(list-of symbol)) T (typep '(a b 1 d) '(list-of symbol)) NIL
Raw
Annotate
Repaste
Edit