[CM] copy-list, guile and r5rs

Rick Taube taube@uiuc.edu
Tue, 16 Dec 2003 09:35:53 -0600


copy-list seems to be working here, can you send me the fail case?
guile> (version)
"1.6.1"
guile> (load "/Lisp/cm-2.4.0/src/cm.scm")
...
guile> (define foo '(a b c))
guile> (eq? foo (copy-list foo))
#f
guile>

On Tuesday, Dec 16, 2003, at 06:00 America/Chicago, rm@fabula.de wrote:

> On Tue, Dec 16, 2003 at 11:08:17AM +0100, Orm Finnendahl wrote:
>> Hi Rick,
>>
>> I stumbled on some problem with copy-list in level1.scm:
>>
>> copy-list doesn't actually do a copy in guile (at least on my
>> machine). To use (append lis '()) for list copying seems to get
>> optimized away despite r5rs' specification of append and the call
>> returns the same object instead of a copy.
>
> ??? What version and how did you test? Here on my box:
> *---------------------------------------------
> |
> | "1.6.4"
> | guile> (define lis (list 1 2 3))
> | guile> (eq?  lis (append lis '()))
> | #f
> | guile>
> |
>
>
>  Ralf Mattes