[plt-scheme] Faking modules with define-values

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sun Jun 25 14:42:45 EDT 2006

> Try this:
>
> (define-values (make-foo foo-f)
>   (let ()
>     (define BLAH 2)
>     (define-struct foo (f))
>     (define (my-make-foo x)
>       (make-foo (+ BLAH x)))
>     (values my-make-foo foo-f)))
>
>   
That worked. I didnt realize you could define things in a let. I looked
through the help-desk for a while before posting but didnt see anything
explicitly saying I could define things in a let. Did I miss it?


Posted on the users mailing list.