Specify concrete types to check for in plistp
This commit is contained in:
parent
111997817d
commit
6206bc669a
1 changed files with 4 additions and 2 deletions
|
@ -32,8 +32,10 @@
|
||||||
|
|
||||||
(defun plistp (lst)
|
(defun plistp (lst)
|
||||||
"Checks if the given list LST is a property list."
|
"Checks if the given list LST is a property list."
|
||||||
(and (some #'keywordp lst)
|
(loop for elem in lst
|
||||||
(some #'stringp lst)))
|
always (or (keywordp elem)
|
||||||
|
(stringp elem)
|
||||||
|
(listp elem))))
|
||||||
|
|
||||||
(deftype plist ()
|
(deftype plist ()
|
||||||
"A property list is a flat list containing keywords and strings."
|
"A property list is a flat list containing keywords and strings."
|
||||||
|
|
Loading…
Add table
Reference in a new issue