Re: [racket] Macro Problem

2010-07-08 Thread Eric Tanter
btw I forgot to say that the macro stepper of drscheme is great to see this at work. If you try on your example, you'll see that the 'return' identifier in (lambda (return) ...) is not the same color as the 'return' identifier in your test. -- Éric On Jul 8, 2010, at 6:59 PM, Eric Tanter wrot

Re: [racket] Macro Problem

2010-07-08 Thread Neil Van Dyke
Eric Tanter wrote at 07/08/2010 06:59 PM: You need to circumvent hygiene to do what you're after; for this, you need to use syntax-case. Scheme, from which Racket has grown, very much wants macros to be hygienic. If you (Manu) are new to macros in Scheme, I'd encourage you to first find

Re: [racket] Macro Problem

2010-07-08 Thread Eric Tanter
That's an hygiene issue: syntax-rules is hygienic, meaning (in that case) that a binding instance introduced by the macro does not capture instances in the original code. You need to circumvent hygiene to do what you're after; for this, you need to use syntax-case. You can look at chapter 36

[racket] Macro Problem

2010-07-08 Thread Manu
Hello I am having a problem with the following macro: (define-syntax lambda-r (syntax-rules () ((_ args exp ...) (lambda args (call-with-current-continuation (lambda (return) exp ... )) it's meant to define a lambda-r form, which wraps a lambda in call/