[plt-scheme] Problem with define-syntax

From: Andre Mayers (andre.mayers at usherbrooke.ca)
Date: Wed Jan 18 21:57:10 EST 2006

Good day

I miss something which is surely basic. 
How can I define a macro that will match a list ? 
Why the following is not working ? 

(define-syntax testListe
  (syntax-rules ()
    [(_ (1 3)) #t]
    [(_ xxx) #f])) 


(define x '(1 3))
(testListe  x) 

Thank you

Andre Mayers, Ph.D., professeur  |  tel: 819-821-8000x2041
Departement d'informatique       |  fax: 819-821-8200
Universite de Sherbrooke         |  andre.mayers at usherbrooke.ca
Sherbrooke (Quebec)              |  http://www.dmi.usherb.ca/~amayers
Canada J1K 2R1




Posted on the users mailing list.