Closed GoogleCodeExporter closed 9 years ago
That is probably by design.
Unlike pairs returned via cons, the constants obtained via quotation are
considered
to be immutable, and, to quote R6RS, "An attempt to store a new value into a
location
referred to by an immutable object should raise an exception with condition type
&assertion".
You can read more about this in "Storage model" (section 5.10 of R6RS [1]), and
in
"Mutable pairs" (chapter 17 of R6RS Standard Libraries [2]).
[1] http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-2.html#node_toc_node_sec_5.10
[2] http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-1.html
Original comment by vmage...@gmail.com
on 17 Apr 2009 at 11:45
Thank you for your messages.
I design ypsilon that conforming R6RS as vmagerya mentioned. So, attempt to
modify
literal constant cause an exception in R6RS mode.
You can suppress such exception by using `--compatible' flag if you have
problem with
existing scheme scripts.
$ ypsilon --compatible
Ypsilon 0.9.6-update3 Copyright (c) 2008 Y.Fujita, LittleWing Company Limited.
> (let ((p '(1 2))) (set-cdr! p 3) p)
(1 . 3)
>
Please try. Thank you!
-- fujita
Original comment by y.fujita...@gmail.com
on 20 Apr 2009 at 11:50
Thanks for clearing things up!
Ken
Original comment by ken.waki...@gmail.com
on 20 Apr 2009 at 1:12
Original issue reported on code.google.com by
ken.waki...@gmail.com
on 16 Apr 2009 at 8:43