Home > Archive > Scheme > March 2004 > Transformation problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Transformation problem
|
|
| Don Felgar 2004-03-31, 8:36 pm |
| How can I transform this:
(bind (proc (arg))
(arg))
to
(define (proc arg) arg)
More generally, something along this line:
(define-syntax bind
(syntax-rules ()
((_ (name a ...) b ...)
(define (name a ...) (b ...)))))
would seem to suffice, except that I can't get rid of the lists
wrapping each argument variable.
Thanks in advance.
| |
| Abdulaziz Ghuloum 2004-03-31, 8:36 pm |
| On Wed, 31 Mar 2004 19:19:50 -0500, Don Felgar wrote
(in message <4a51e3b6.0403311619.27e6a151@posting.google.com> ):
> (define-syntax bind
> (syntax-rules ()
> ((_ (name a ...) b ...)
> (define (name a ...) (b ...)))))
(define-syntax bind
(syntax-rules ()
((_ (name a ...) b ...)
(define (name a ...) b ...))))
| |
| Abdulaziz Ghuloum 2004-03-31, 8:36 pm |
| Xref: kermit comp.lang.scheme:40938
On Wed, 31 Mar 2004 19:19:50 -0500, Don Felgar wrote
(in message <4a51e3b6.0403311619.27e6a151@posting.google.com> ):
> (define-syntax bind
> (syntax-rules ()
> ((_ (name a ...) b ...)
> (define (name a ...) (b ...)))))
What I meant was:
(define-syntax bind
(syntax-rules ()
((_ (name a ...) (b ...))
(define (name a ...) b ...))))
|
|
|
|
|