[alexandria-devel] cdr assoc (now called alist-get)
John Fremlin
john at fremlin.org
Sun Sep 27 23:36:34 UTC 2009
"Tobias C. Rittweiler" <tcr at freebits.de> writes:
> "Tobias C. Rittweiler" <tcr at freebits.de> writes:
>
>> my personal favorite would be
>>
>> ASSOC-VALUE
>
> Or perhaps GETASSOC imitating GETHASH.
Certainly a better way of dealing with alists would be useful.
cdr-assoc is the customary name for this functionality.
The problem is with the order of parameters: alist and key. As far as I
know, cdr-assoc has been implemented both as taking the key first and as
taking the alist first. That's why I wanted a new name.
At least, getassoc (and presumably getrassoc) would clearly indicate key
first, by analogy with gethash.
I think that is sensible . . . I can send a new patch with the new names
if you like.
(If alexandria wakes up then I have a patch to fix some other stuff too.)
More information about the alexandria-devel
mailing list