[plt-dev] may I add example of expand? (was: Re: [plt-scheme] documentation feature requests)

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Nov 17 15:07:35 EST 2009

I think you probably also want an example with a namespace anchor and
without a module:

#lang scheme

(define-namespace-anchor anchor)
(parameterize ([current-namespace (namespace-anchor->namespace anchor)])
    '(delay (+ 1 2)))))

On Tue, Nov 17, 2009 at 1:05 PM, John Clements
<clements at brinckerhoff.org> wrote:
> On Nov 15, 2009, at 3:40 PM, Robby Findler wrote:
>> I've seen that Jon Rafkind has been adding such things to lots of
>> places in the docs and I've put them in the new image documentation
>> library (http://pre.plt-scheme.org/docs/html/teachpack/2htdpimage.html),
>> so I think it is safe to say we recognize the need and are working on
>> it.
> Every time I want to use 'expand' I have to spend 10 minutes trying to remember all of the pieces.  This appears to me to be about the shortest way to use 'expand' correctly:
> (parameterize ([current-namespace (make-base-namespace)])
>  (expand
>   (datum->syntax
>    #f
>    '(module foo scheme
>       (define a 3)
>       (+ a 4)))))
> Would it be appropriate to add this (or a simpler form, if it exists) to the 'expand' documentation? It would certainly have helped me.
> John
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Posted on the dev mailing list.