SRFI-48 incorrect mutation of literal list in example?
"Sudarshan S Chawathe" <[email protected]> Thu, 31 Dec 2015 21:32:18 -0500
| Newsgroups | gmane.lisp.scheme.srfi.srfi-48 |
|---|---|
| Message-ID | <[email protected]> |
[Resending from subscribed email address; sorry if duplicate.] I believe the following example in SRFI-48 document is incorrect in R5RS and beyond, as it mutates a literal constant. (format "~w" (let ( (c '(a b c)) ) (set-cdr! (cddr c) c) c)) ; =3D> "#1=3D(a b c . #1#)" I realize this SRFI has been finalized for a while (and I am not aware of any protocol for errata), but at least the mailing list archives may serve as a record that could help someone down the road (assuming I am not mistaken about the above). [I guess this "outs" me as a format string user. I promise to use it only very sparingly and cautiously, and I will try to kick the habit in the new year.] Regards, -chaw