In TYPEP, support * in CONS type specifiers, as in (typep (cons 1 2) '(CONS * t))

parent 1fb93d77
......@@ -481,8 +481,12 @@ Returns T if X belongs to TYPE; NIL otherwise."
))
(SEQUENCE (or (listp object) (vectorp object)))
(CONS (and (consp object)
(or (endp i) (typep (car object) (first i)))
(or (endp (cdr i)) (typep (cdr object) (second i)))))
(or (endp i)
(let ((car-type (first i)))
(or (eq car-type '*) (typep (car object) car-type))))
(or (endp (cdr i))
(let ((cdr-type (second i)))
(or (eq cdr-type '*) (typep (cdr object) cdr-type))))))
(BASE-STRING
(and (base-string-p object)
(or (null i) (match-dimensions object i))))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment