[alexandria-devel] Re: remove-from-plist
Tobias C. Rittweiler
tcr at freebits.de
Tue Mar 11 14:02:11 UTC 2008
Michael Weber <michaelw+alexandria at foldr.org> writes:
> Below are three different implementations of remove-from-plist, all of
> which I find more aestetic than current alexandria's implementation.
> YMMV.
>
> I would favor the first one, which explicitly ditches error checking
> ("it's user responsibility", and a proper plist will be returned).
What about using Alexandria's DOPLIST which does the error checking for
us?
-T.
(defun remove-from-plist (plist &rest keys)
(let (result)
(doplist (k v plist (nreverse result))
(unless (member k keys :test #'eq)
(push k result) (push v result)))))
More information about the alexandria-devel
mailing list