[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Define in let
From: |
Ralf Mattes |
Subject: |
Re: Define in let |
Date: |
Wed, 21 Aug 2013 12:32:58 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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?
> 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
HTH RalfD
- Re: Define in let, (continued)
- Re: Define in let, Thompson, David, 2013/08/20
- Re: Define in let, Taylan Ulrich B., 2013/08/20
- Re: Define in let, Ian Price, 2013/08/20
- Re: Define in let, Mike Gran, 2013/08/20
- Re: Define in let, John B. Brodie, 2013/08/20
- Re: Define in let, David Pirotte, 2013/08/20
Re: Define in let, Dmitry Bogatov, 2013/08/21