[plt-scheme] Letrect (was blah. units)

From: Zbyszek Jurkiewicz (zbyszek at duch.mimuw.edu.pl)
Date: Thu Oct 31 03:46:52 EST 2002

On Mon, 28 Oct 2002, Jerzy Karczmarczuk wrote:

> Guess what is (say, in DrScheme) the value of (cadr y) where
> (define y
>    (letrec ((x (cons 1 x)) x)
> )

This waits, because one closing paren is missing.  Yes, I would expect
this ;-)

After adding it, you get what you pay for.  Scheme is not lazy, so there 
is no appropriate behaviour here.  One cannot signal unbound
variable error here, because x is bound.  There is some
discussion of this in SICP in connection with internal DEFINEs.

> Yes, you guessed it right. Are you happy with it? I am not. But my
> personal philosophy was rather coherent than valuable...

Probably nobody is, but there is no visible solution right now.
If you introduce laziness here, you would get problems with 
assignments (or its newer verision known as object-oriented

Best regards,

Zbyszek Jurkiewicz

Posted on the users mailing list.