[Alexandria-devel] [alexandria-devel] Implementation of DELETE-FROM-PLIST
James M. Lawrence
llmjjmll at gmail.com
Sun Jul 27 14:58:37 UTC 2014
On Tue, Mar 4, 2014 at 2:43 AM, Attila Lendvai <attila.lendvai at gmail.com> wrote:
> pushed, thanks!
>
> and sorry for the "delay"!
I just noticed the function I wrote was replaced with
(dolist (key keys plist)
(remf plist key))
but that does not match the behavior of remove-from-plist,
CL-USER> (alexandria:remove-from-plist (list :a 1 :b 2 :a 3) :a)
(:B 2)
CL-USER> (alexandria:delete-from-plist (list :a 1 :b 2 :a 3) :a)
(:B 2 :A 3)
It also don't check for malformed plists. The commit message says the
remf version is faster, but I found it to be around four times slower
for some data and insignificantly different otherwise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-the-original-DELETE-FROM-PLIST-replacement.patch
Type: text/x-diff
Size: 1453 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/alexandria-devel/attachments/20140727/7932ff7e/attachment.patch>
More information about the alexandria-devel
mailing list