Specify concrete types to check for in plistp

This commit is contained in:
Marcus Kammer 2023-09-18 22:47:25 +02:00
parent 111997817d
commit 6206bc669a
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -32,8 +32,10 @@
(defun plistp (lst)
"Checks if the given list LST is a property list."
(and (some #'keywordp lst)
(some #'stringp lst)))
(loop for elem in lst
always (or (keywordp elem)
(stringp elem)
(listp elem))))
(deftype plist ()
"A property list is a flat list containing keywords and strings."