LAST CALL for SRFI-113, Sets and bags John Cowan (16 Aug 2014 00:23 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Michael Sperber (16 Aug 2014 14:11 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (16 Aug 2014 18:16 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Per Bothner (16 Aug 2014 20:33 UTC)
Broken SRFI 113 title John Cowan (16 Aug 2014 23:19 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Kevin Wortman (18 Aug 2014 22:11 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (18 Aug 2014 22:38 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Per Bothner (18 Aug 2014 22:42 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Kevin Wortman (18 Aug 2014 22:57 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (19 Aug 2014 00:26 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Kevin Wortman (19 Aug 2014 17:57 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (19 Aug 2014 18:18 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Kevin Wortman (19 Aug 2014 21:15 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (19 Aug 2014 22:20 UTC)
Re: LAST CALL for SRFI-113, Sets and bags Kevin Wortman (20 Aug 2014 06:44 UTC)
Re: LAST CALL for SRFI-113, Sets and bags John Cowan (20 Aug 2014 13:28 UTC)

Re: LAST CALL for SRFI-113, Sets and bags John Cowan 19 Aug 2014 18:18 UTC

Kevin Wortman scripsit:

> One last thing: in alist->bag and alist->bag!, what happens if the same
> element appears multiple times, with different counts, in the alist? Or is
> that implicitly disallowed by the definition of what an alist is?

The usual uses of alists mean that the first appearance of a key should
win, which is how assoc works, so that you can push new mappings on top
of old ones non-destructively.

Unfortunately, the implementation is buggy and makes the last appearance
win.  That's easy to fix for alist->bag, but tricky for alist->bag!,
where we want the first appearance *in the alist* to win, beating both
later appearances and any existing entry.  Suggestions?

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
MEET US AT POINT ORANGE AT MIDNIGHT BRING YOUR DUCK OR PREPARE TO FACE WUGGUMS