[plt-scheme] macro writing

From: Ivanyi Peter (pivanyi at freemail.hu)
Date: Tue Jun 20 03:20:18 EDT 2006


I would like to do something like this. How can I solve the
to have a second ellipses in the list after "locals"? Can
somebody help
me with this or point to the right direction? 
(Macro writing is not my strength.)


Peter Ivanyi

(define-syntax call
  (syntax-rules ( locals )
    ((_ n1 (v1 v2 ... locals v3 v4 ...) e1 e2 ...)
     (define (n1 v1 v2 ...)
         ((v3 #f) (v4 #f) ...)
         e1 e2 ...

(call aa (a b locals c)
  (set! c 3)
  (+ a b c)

Dobrády Ákos csak neked! Töltsd le a TNT frontemberének szenzációs új dalát, és személyre szólóan dedikált album borítót nyerhetsz!

Posted on the users mailing list.