[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: local syntax-rules
From: |
Lars J. Aas |
Subject: |
Re: local syntax-rules |
Date: |
Tue, 7 Nov 2000 16:51:49 +0100 |
User-agent: |
Mutt/1.2.5i |
On Tue, Nov 07, 2000 at 02:49:38PM +0100, Lars J. Aas wrote:
: On Tue, Nov 07, 2000 at 12:23:28PM +0200, Ivan Toshkov wrote:
: : If I think of something I'll let you know :) Meanwhile, why don't you try
to
: : post your question in comp.lang.scheme and see what they have to say about
it?
: : I guess most of the guile developers/users prefer lisp-style macros and
that's
: : why you don't get many answers here...
:
: I think I'll give up on syntax-rules for now, and learn the procedure->*
: approach instead...
...which has excellent documentation, btw... ;)
| - primitive: procedure->macro code
| Returns a "macro" which, when a symbol defined to this value
| appears as the first symbol in an expression, evaluates the result
| of applying CODE to the expression and the environment. The value
| returned from CODE which has been passed to
| `procedure->memoizing-macro' replaces the form passed to CODE.
| For example:
|
| (define trace
| (procedure->macro
| (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr
x))))))
|
| (trace foo) == (set! foo (tracef foo 'foo)).
|
| - primitive: procedure->memoizing-macro code
| Returns a "macro" which, when a symbol defined to this value
| appears as the first symbol in an expression, evaluates the result
| of applying PROC to the expression and the environment. The value
| returned from PROC which has been passed to
| `procedure->memoizing-macro' replaces the form passed to PROC.
| For example:
|
| (define trace
| (procedure->macro
| (lambda (x env) `(set! ,(cadr x) (tracef ,(cadr x) ',(cadr
x))))))
|
| (trace foo) == (set! foo (tracef foo 'foo)).
I don't see any difference, except for the s/CODE/PROC/ difference.
Lars J
- local syntax-rules, Lars J. Aas, 2000/11/06
- local syntax-rules, Ivan Toshkov, 2000/11/06
- Re: local syntax-rules, Lars J. Aas, 2000/11/06
- Re: local syntax-rules, Lars J. Aas, 2000/11/06
- Re: local syntax-rules, Ivan Toshkov, 2000/11/07
- Re: local syntax-rules, Ivan Toshkov, 2000/11/07
- support for (... ...) ellipsis quoting? (Was: local syntax-rules), Lars J. Aas, 2000/11/07
- support for (... ...) ellipsis quoting? (Was: local syntax-rules), Ivan Toshkov, 2000/11/08
- Re: local syntax-rules, Lars J. Aas, 2000/11/07
- Re: local syntax-rules,
Lars J. Aas <=