[plt-scheme] a few questions (was: Scheme questions?)

From: Gregory Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Sun Dec 4 17:30:49 EST 2005

On Dec 4, 2005, at 1:58 PM, Carl Eastlund wrote:

> All questions relevant to [PLT] Scheme are welcome.  Sometimes we get
> more implementation questions and sometimes more language questions;
> it's purely incidental.  Ask away.

Okay, as a newcomer to the language, letrec seems reasonably  
intuitive to me, named let is mysterious. (I think of letrec as  
binding a set of symbols to lambda expressions, where the expressions  
may involve mutual recursion. It seems to me that in

(let whatever ((..)...)

whatever is used in the body of the expression as if though it were  
itself a lambda expression, but how this works (and what the correct  
syntax is) seems rather mysterious.

I know this is an old paper, but in "Lambda: The Ultimate  
Imperative"  (1976),  Guy L. Steele uses some syntax that I don't  
recognize at all.  Something like

                        (IF B1 (L2)
                            (BLOCK S1
                                   (IF B2 (L2)
                                       (BLOCK S2 (L1))))))))
           (L2 (LAMBDA () S3))

Is LABELS a special form in some  version of scheme, or something  
bound by an enclosing let? Something else?

It is meant to be a translation of the following (due to Knuth)

L1:		if B1 then go to L2;
		if B2 then go to L2;
		go to L1;
L2:		S3;

> --Carl
> P.S. Welcome to the list!


Gregory Woodhouse
gregory.woodhouse at sbcglobal.net

"The most incomprehensible thing about
the world is that it is at all comprehensible."
  --Albert Einstein (1879-1955)

Posted on the users mailing list.