2013/8/21 Ralf Mattes <r...@seid-online.de>

> On Wed, Aug 21, 2013 at 12:17:43PM +0200, Panicz Maciej Godek wrote:
> > You're right, but it only works if you want to export only one symbol
> > from a lexical scope. If you wanted a few procedures accessing
> > a single scope, you'd either need to use the solution with 'set!',
> > or -- as Taylan suggested -- have a "define-values" form.
>
> Yes, but was that the OP's question?
>
>
Well, if the question is "to reduce scope of variable as much as possible",
then I think that the issue of defining multiple procedures within the same
scope is a part of that question, even if it wasn't posited directly


> > Actually, I think should also be possible to write a "define-values"
> > macro using the method I presented
> [... snip ...]
> > but somehow we need to generate identifiers for symbol1 symbol2 ...
> > (here I wrote symbolically value1 value2 ..., but I'd appreciate if
> someone
> > more competent could provide a syntax-rules-based solution)
>
> Maybe it's time to point out that this question is in the Scheme-FAQ ;-)
> [http://community.schemewiki.org/?scheme-faq-language] - Section
> "Is there a way to define top-level closures?" (sorry, bad webdesign,
> no wa to link directlyto the topic). The answer not only mentions
> 'define-values but also links to an implementation:
> [http://community.schemewiki.org/?scheme-faq-macros#multidefine]
> that uses 'syntax-rules
>
> Thanks! :)

Reply via email to