This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: bug in append!
- To: Ivan Toshkov <ivant at intransco dot com>
- Subject: Re: bug in append!
- From: Roland Orre <orre at nada dot kth dot se>
- Date: Mon, 18 Oct 1999 13:39:28 +0200 (MET DST)
- CC: guile at sourceware dot cygnus dot com
- Reply-to: orre at nada dot kth dot se (Roland Orre)
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