[ sisc-Bugs-1320677 ] append functions do not produce mutable copies
"SourceForge.net" <[email protected]> Sun, 09 Oct 2005 10:27:51 -0700
| Newsgroups | gmane.comp.java.sisc.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1320677, was opened at 2005-10-09 18:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1320677&group_id=23735 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 7 Submitted By: Matthias Radestock (mradestock) Assigned to: Nobody/Anonymous (nobody) Summary: append functions do not produce mutable copies Initial Comment: According to R5RS, |append| and |string-append| is supposed to produce copies, which, since they are copies, ought to be mutable even when the original wasn't. SISC gets this wrong for the last list in an |append| and single-arg |string-append|; #;> (define l1 '()) #;> (define l2 (append l1)) #;> (define l3 (append '() l1)) #;> (eq? l1 l2) #t #;> (set-car! l2 2) Error in set-car!: expected type pair, got '()'. console:165:1: <from call to set-car!> #;> (set-car! l3 2) Error in set-car!: expected type pair, got '()'. console:166:1: <from call to set-car!> #;> (define s1 "foo") #;> (define s2 (string-append s1)) #;> (eq? s1 s2) #t #;> (string-set! s2 0 #\b) Error in string-set!: string is immutable. console:170:1: <from call to string-set!> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379534&aid=1320677&group_id=23735 ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl