guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing the signature of ‘vhash-assoc’


From: Ludovic Courtès
Subject: Re: Changing the signature of ‘vhash-assoc’
Date: Thu, 15 Jul 2010 23:45:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

I already changed my mind...  :-)

address@hidden (Ludovic Courtès) writes:

> Indeed, if ‘vhash-assoc’ et al. are changed to return a vhash instead of
> a pair, then we have all that’s needed to do that:

[...]

> Thus I’m planning to make that change.  [The ‘vhash-fold-matches’ above
> conses at each match whereas the attached one doesn’t, but that’s OK.]

Thinking more about it, I think I’d rather keep ‘vhash-assoc’ & co. as
they are, and add ‘vhash-assoc*’ & co., which would return a vhash.

This is so that ‘vhash-assoc’ keeps the overhead minimal for the common
pattern where only one value is associated with a key.  Also,
‘vhash-assoc’ is a drop-in replacement for SRFI-1 ‘assoc’, which is
probably worth keeping.

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]