[plt-scheme] expand

From: Jos K oot (jos.koot at telefonica.net)
Date: Wed May 23 11:38:30 EDT 2007

Thanks, that's clear.
Jos Koot

----- Original Message ----- 
From: "Ryan Culpepper" <ryanc at ccs.neu.edu>
To: "Jos K oot" <jos.koot at telefonica.net>
Cc: "PLT-list" <plt-scheme at list.cs.brown.edu>
[nsip]

No. 'begin' forms can still show up in fully-expanded code as 
expressions:

(expand '(#%expression (begin (begin 'a 'b) (begin (begin 'c)))))

(expand '(module m mzscheme (#%expression (begin 'a 'b))))

(expand '(lambda () (#%expression (begin 'a 'b))))

The expander flattens out 'begin' forms when looking for definitions, 
whether at the top-level or within a module or within an internal 
definition context (a 'lambda' body, etc). Once it goes into expression 
mode, it stops treating 'begin' specially.

Ryan

[snip]
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme




Posted on the users mailing list.