Open Ambrevar opened 2 years ago
I think the definition of "property list" includes any kind of symbol, not just keywords. After all you can define functions that take plain symbols as keywords (e.g. (defun fn (&key ((x x) nil)) x)
which would be called as (fn 'x 1)
). But I can also see the usefulness of being able to test for a property list that only allows keywords when that's what you expect.
Good point!
It occurred to me a few times that I had to check whether an object is a valid plist. A
plist-p
helper would be nice here!trivial-types has
property-list-p
but it accepts'(foo 1)
which seems wrong to me.Here is a fix:
Alternatively, shorter but less efficient I presume:
Thoughts?