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: bug in append!


Ivan Toshkov <ivant@intransco.com> wrote:
> guile> (define a '())
> guile> (append! a '(b))
> (b)
> guile> a
> ()
This is not a bug. Scheme does not work this way, append! can only
append concatenate destructively if there is at least one pair
in the list. To be safe you have to
(set! a (append! a '(b)))

By the way, do you know any scheme that behaves in that way?

	Best regards
	Roland

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