From: Ralf Mattes <rm@seid-online.de>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Define in let
Date: Wed, 21 Aug 2013 12:32:58 +0200 [thread overview]
Message-ID: <20130821103258.GB16017@seid-online.de> (raw)
In-Reply-To: <CAMFYt2b9D1z___sqNnDbOT8OuhVz3K+qP8+0fqTE27UznQ=BXA@mail.gmail.com>
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
next prev parent reply other threads:[~2013-08-21 10:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 16:39 Define in let Dmitry Bogatov
2013-08-20 16:57 ` Thompson, David
2013-08-20 17:02 ` Taylan Ulrich B.
2013-08-20 17:18 ` John B. Brodie
2013-08-20 17:19 ` Ian Price
2013-08-20 17:52 ` Mike Gran
2013-08-20 21:01 ` David Pirotte
2013-08-21 6:52 ` Panicz Maciej Godek
2013-08-21 6:55 ` Panicz Maciej Godek
2013-08-21 9:28 ` Ralf Mattes
2013-08-21 10:17 ` Panicz Maciej Godek
2013-08-21 10:32 ` Ralf Mattes [this message]
2013-08-21 11:01 ` Panicz Maciej Godek
2013-08-21 15:42 ` Dmitry Bogatov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130821103258.GB16017@seid-online.de \
--to=rm@seid-online.de \
--cc=godek.maciek@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).