|
From: | Panicz Maciej Godek |
Subject: | Re: Syntax-rules generate symbol |
Date: | Mon, 9 Sep 2013 18:59:06 +0200 |
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])))
[Prev in Thread] | Current Thread | [Next in Thread] |