[plt-scheme] macro writing

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

Hi,

I would like to do something like this. How can I solve the
problem
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.)

Thanks,

Peter Ivanyi


(define-syntax call
  (syntax-rules ( locals )
    ((_ n1 (v1 v2 ... locals v3 v4 ...) e1 e2 ...)
     (define (n1 v1 v2 ...)
       (let*
         ((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!
http://zenearuhaz.t-online.hu/index.php?m=landingpage&pagename=dobrady




Posted on the users mailing list.