From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: syntax-locally-bound-identifiers, local-eval
Date: Sun, 22 Jan 2012 01:28:19 +0100 [thread overview]
Message-ID: <87aa5gd1i4.fsf@gnu.org> (raw)
In-Reply-To: 87vco6tuxy.fsf@pobox.com
Andy Wingo <wingo@pobox.com> skribis:
> (define-syntax lexicals
> (lambda (x)
> (syntax-case x ()
> ((lexicals) #'(lexicals lexicals))
> ((lexicals scope)
> (with-syntax (((id ...)
> (filter (lambda (x)
> (eq? (syntax-local-binding x) 'lexical))
> (syntax-locally-bound-identifiers #'scope))))
> #'(list (cons 'id id) ...))))))
>
> (let* ((x 10) (x 20)) (lexicals))
> => ((x . 10) (x . 20))
Ooooh, I’m starting to find it fun! :-)
Ludo’.
prev parent reply other threads:[~2012-01-22 0:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 12:33 syntax-locally-bound-identifiers, local-eval Andy Wingo
2012-01-20 12:42 ` Andy Wingo
2012-01-20 19:04 ` Mark H Weaver
2012-01-20 20:00 ` Mark H Weaver
2012-01-22 7:01 ` Mark H Weaver
2012-01-23 12:52 ` Andy Wingo
2012-01-25 23:44 ` Andy Wingo
2012-01-22 0:28 ` Ludovic Courtès [this message]
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=87aa5gd1i4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@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).