[plt-scheme] How to insert an element in empty list?

From: Jos Koot (jos.koot at telefonica.net)
Date: Fri Aug 17 23:54:45 EDT 2007

(require mzscheme)
(set! sin cos)
set!: cannot mutate module-required variable in: sin

or:

(module top-safe mzscheme (set! sin cos))
set!: cannot mutate module-required variable in: sin 

Jos Koot

----- Original Message ----- 
From: "Majorinc, Kazimir" <kazimir at chem.pmf.hr>
To: "Jos Koot" <jos.koot at telefonica.net>
Cc: <jerzy.karczmarczuk at info.unicaen.fr>; <plt-scheme at list.cs.brown.edu>
Sent: Saturday, August 18, 2007 3:45 AM
Subject: Re: [plt-scheme] How to insert an element in empty list?


> Jos Koot wrote:
>>> All this, and Matthias pedagogical answer in particular, remind me times
>>> when I used Fortran; I remember one implementation on a CDC mainframe,
>>> where the user *could* corrupt numerical constants, for example 
>>> making that
>>> a constant 1 (stored in memory, not an assembly-level literal...) became
>>> equal to 2. What a mess it could produce, you can hardly imagine...
>> As far as I can remember most FORTRAN (older than Fortran) compilers 
>> allowed this and many other evils (some decennia ago)
>> Jos koot
> Perhaps (set! sin cos) and (set! call/cc "Hello world") are not that far.
> 
> Kazimir Majorinc
> 
> 
>


Posted on the users mailing list.