unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Syntax-rules generate symbol
@ 2013-09-09 16:19 Dmitry Bogatov
  2013-09-09 16:59 ` Panicz Maciej Godek
  2013-09-10 10:33 ` Ian Price
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Bogatov @ 2013-09-09 16:19 UTC (permalink / raw)
  To: guile-user@gnu.org

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]


Hello!

Here is my implementation of for loop. I found lisp really extremely
flexible, but there is one problem --- more often then not I do not need
var part, so I do not care how it would be named --- all I care is that
it will not shadow any other bindings.

I think I can do it(did not tryed it) with `define-macro` and uninterned
symbols, but it mean give up beauty of syntax-rules.

Masters of syntax-rules and syntax-case, please give me peace of advice.

(define-syntax for
    (syntax-rules (in => as)
	([_ (pattern as var in list) exp ...]
	 [for-each (lambda (var) (match var (pattern exp ...))) list])))

PS. Please, keep in CC, I am not subscribed.

--
Best regards, Dmitry Bogatov <KAction@gnu.org>,
Free Software supporter and netiquette guardian.
	git clone git://kaction.name/rc-files.git --depth 1
	GPG: 54B7F00D
Html mail and proprietary format attachments are forwarded to /dev/null.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-10 10:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 16:19 Syntax-rules generate symbol Dmitry Bogatov
2013-09-09 16:59 ` Panicz Maciej Godek
2013-09-09 20:03   ` Taylan Ulrich B.
2013-09-10  6:11     ` Panicz Maciej Godek
2013-09-10  9:16       ` Taylan Ulrich B.
2013-09-10 10:38       ` Ian Price
2013-09-10 10:33 ` Ian Price

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).