This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for append!


On 21 Jan 2000, Mikael Djurfeldt wrote:

> Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
>
> > Then we need a fix, right? :-)
>
> I'm sorry for fooling you like this.  As you might have seen, we've
> now discovered that SRFI-1 suggests an append! which can take an
> improper list or atom as last arg.  So, while inconsistent, Guile's
> old behaviour is what we want to have.

You didn't fool me:  It's not about an improper list as a _last_ argument,
but rather about an improper list as an intermediate argument.

Example:  Without my patch guile would evaluate (append! '(1 . 2) 3)  to
'(1 3), thus overwriting the '2'.  This is in contrast to the behaviour of
append, which will throw an error if anything but the last argument is not
a proper list.

My patch only makes sure that _intermediate_ improper lists result in an
error.  The last parameter may be anything, which is exaclty how append
handles this case.

Best regards,
Dirk Herrmann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]