Thanks Jay and Gary,
I remember seeing something like this in an APL variant and it was one
of the few features I didn't know how to translate into scheme.
Cheers,
Paul Pereira
On 23 February 2012 14:36, Jay McCarthy wrote:
> I think you should look at the Macro Stepper output for your failing
I think you should look at the Macro Stepper output for your failing
example, because you'll see that the code that references y appears in
the branch that doesn't have access to a y. You'd want to do something
in the macro to determine which function to compile to.
Jay
p.s. I'm glad you like sup
#lang racket
(define-syntax (fun stx)
(syntax-case stx ()
((fun body rest ...)
(with-syntax ((x (datum->syntax #'body 'x))
(y (datum->syntax #'body 'y))
(z (datum->syntax #'body 'z)))
(let ([y? (identifier-binding #'y)]
[z? (iden
3 matches
Mail list logo