Re: Bug?

From: Lars Thomas Hansen <>
Date: Thu, 17 Oct 96 12:40:22 -0400

>This last statement is the clue. You've made self-modifying code.
>Apparently set-car! ends up being applied to '(()). This ends up
>changing your source code. Try (split1 '()) after running your test a
>couple of times. You'll see that split1 does not return '(()).
>I don't know if this is a bug [...]

According to the R4RS, section 2.4 (and I expect the IEEE std, although I
don't have it handy), changing a constant is an error:

"In many systems it is desirable for constants (i.e. the values of
literal expressions) to reside in read-only-memory. [...] It is an
error to attempt to store a new value into a location that is denoted by
an immutable object."

Received on Thu Oct 17 1996 - 18:43:05 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST