[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] fixes to tailp and nconc
From: |
Peter Wood |
Subject: |
Re: [Gcl-devel] fixes to tailp and nconc |
Date: |
Tue, 28 Jan 2003 06:05:26 +0100 |
User-agent: |
Mutt/1.4i |
On Mon, Jan 27, 2003 at 08:14:36PM -0600, Paul F. Dietz wrote:
> Camm Maguire wrote:
>
> >>nconc can take a dotted list. This means GCL is in error here:
> >>
> >>(nconc '(a . b) 'c) ==> signals an error saying 'b is not a list.--
> >>should be '(a . c)
> >>
> >>Also tailp must return T for nil and a proper list. GCL is doing this:
> >>
> >>(tailp nil '(a b c)) ; ==> nil -- should be T
> >>
> >>I can't submit a diff, since my list.d also contains other changes,
> >>but I think this is the relevant code (attached).
>
>
> The NCONC change is broken:
>
> >(nconc (cons 'a 'b) (cons 'c 'd))
>
> (A B C . D) ;; <-- should not have the C
>
> TAILP is also broken:
>
> >(tailp nil '(a b . c))
>
> T ;; <-- NIL is not a tail of (a b . c)
>
The fixes _I_ posted are _not_ broken:
> (nconc (cons 'a 'b) (cons 'c 'd))
(A C . D)
> (tailp nil '(a c . d))
NIL
Regards,
Peter