[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete! |
Date: |
Sat, 13 Feb 2016 19:49:32 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Feb 14, 2016 at 12:15:15AM +1300, Evan Hanson wrote:
> Hi Peter,
>
> That's great, thanks for the patch necromancy and all of the related
> improvements. I especially like the argument order standardization. I've
> applied these, and will update the srfi-1 egg as well.
I noticed you forgot to update srfi-1, so I just did that.
Interestingly, srfi-1.types didn't have an entry for assoc or member,
probably because those are also available in core. I've added them now,
including the specializations, and made then #:foldable too.
I haven't yet published this as a new release because it's a minor
change. I noticed there are no tests for the srfi-1 egg, maybe we should
consider copying them from another Scheme? From a quick check, only
Chibi has some minor tests for it.
> Attached is another small improvement: if memq, memv, or member return a
> list, the type of its first element will be the same as the first
> procedure argument. Actually, this isn't true of member in CHICKEN 4
> since one can do footgunish things with the comparison procedure, but it
> works for the rest.
This can be done analogously for assv and assq (and assoc in CHICKEN 5).
We can't do it for assoc in CHICKEN 4 and rassoc in either version because
of the same footgunnery that can be done with the SRFI-1 version of member.
See the attached patches.
Cheers,
Peter
0001-Preserve-type-of-argument-in-car-in-assq-assv-assoc-.chicken-5.patch
Description: Text Data
0001-Preserve-type-of-argument-in-car-in-assq-assv-proced.master.patch
Description: Text Data
signature.asc
Description: Digital signature
- Re: [Chicken-hackers] PATCH: wrong type for alist-delete!, Peter Bex, 2016/02/11
- Re: [Chicken-hackers] PATCH: wrong type for alist-delete!, Peter Bex, 2016/02/12
- Re: [Chicken-hackers] PATCH: wrong type for alist-delete!, Andy Bennett, 2016/02/12
- Re: [Chicken-hackers] PATCH: wrong type for alist-delete!, Peter Bex, 2016/02/12
- Re: [Chicken-hackers] PATCH: wrong type for alist-delete!, Peter Bex, 2016/02/12
- [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!, Evan Hanson, 2016/02/13
- Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!,
Peter Bex <=
- Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!, John Cowan, 2016/02/13
- Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!, Evan Hanson, 2016/02/13
- Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!, Peter Bex, 2016/02/13
- Re: [Chicken-hackers] [PATCH] Re: wrong type for alist-delete!, Mario Domenech Goulart, 2016/02/14