[plt-scheme] Defining structures

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Wed Feb 18 16:26:43 EST 2009

On Wed, Feb 18, 2009 at 1:52 PM, aditya shukla
<adityashukla1983 at gmail.com> wrote:
> A question that comes to mind if variables in scheme do not have type in
> scheme thus can be say that
>
> (define a 9) -here a is a placeholder for a value whose tag is a number
>
>> (define a 'aditya)
> define: cannot redefine name: a
>
>
>
> why can't we redefine a here?
>
>
> Aditya

Because you can only define something once. It doesn't have to do with
the type--even if you tried to redefine a as another number, you'd
still get the same error:

(define a 1)
(define a 2) <---- Scheme doesn't like this either

Todd


Posted on the users mailing list.