Sam Halliday
unread,May 25, 2016, 5:23:14 PM5/25/16You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi all,
This causes an error
(cl-destructuring-bind
(&key a b)
'(:a "foo" :b 13 :c "bar")
(list a b))
because the :c key/value is not handled in the pattern match.
Often I find myself wanting to extract some subset of keys/values from a plist, but cl-destructuring-bind isn't appropriate because of this limitation.
Is there a way to make cl-destructuring-bind simply ignore unmatched keys in the EXPR? I'm not sure what the official common lisp behaviour is supposed to be here, is the error in the spec?
Note that the dash library has some support for a similar destructuring with -let, but that requires some boilerplate to assign a symbol to each key.
Best regards,
Sam