[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Add non-destructive version of alist-updat
From: |
Moritz Heidkamp |
Subject: |
Re: [Chicken-hackers] [PATCH] Add non-destructive version of alist-update! |
Date: |
Tue, 13 Sep 2011 15:21:22 +0200 |
Hi Felix,
Felix <address@hidden> writes:
> Thanks, Moritz. Here a few suggestions:
>
> - alist-update copies more of the argument list than necessary, it
> only has to copy up to the first matching entry
> - an entry for types.db is missing
thanks for the feedback, attached is an updated version of the patch. I
hope I got the types.db entry right!
By the way: I noticed that when an unknown comparison procedure is
passed alist-update! it will also accept non-alists, e.g.:
#;1> (alist-update! 123 123 '(x y z) =)
((123 . 123) x y z)
Whereas for example the default (eqv?) gives:
#;2> (alist-update! 123 123 '(x y z))
Error: (assv) bad argument type: x
Not sure if this is really a problem.
Moritz
non-destructive-alist-update.patch
Description: Text Data