This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: bug in append!
- To: Roland Orre <orre at nada dot kth dot se>
- Subject: Re: bug in append!
- From: Ivan Toshkov <ivant at intransco dot com>
- Date: Mon, 18 Oct 1999 14:58:17 +0300
- Cc: Ivan Toshkov <ivant at intransco dot com>, guile at sourceware dot cygnus dot com
- References: <199910181139.NAA27547@faun.nada.kth.se>
On Mon, Oct 18, 1999 at 01:39:28PM +0200, Roland Orre wrote:
> 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)))
maybe you mean (set! a (append a '(b))) ?
yes, that works and that's the way I rewrote it..
>
> By the way, do you know any scheme that behaves in that way?
Can't remember... though I think that it worked on some version of Texas Instruments Scheme (very unsure about that)
>
> Best regards
> Roland
--
Ivan Toshkov