[plt-scheme] immutable? and numbers
At Tue, 16 Sep 2008 17:37:14 -0300, "Gustavo Massaccesi" wrote:
> I tried this:
>
> --------
> Welcome to DrScheme, version 372 [3m].
> Language: Textual (MzScheme, includes R5RS) custom.
> > (immutable? 5)
> false
> >
> --------
>
> I was surprised because it returns #f and not #t.
>
> It is the correct behaviour, according to the manual. But, since it is
> impossible to mutate 5, it is not the result I expected.
Agreed. `immutable?' really should have been called something like
`immutable-variant-of-datatype-that-could-be-mutable?'.
Matthew