[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [plt-scheme] defining macros in mzscheme 103



I think you need to declare your macro this way:
(define-macro new-core
  (lambda () `(make-vector 4 0)))

But then you may want to write it in a simplier way:
(define (new-core)
    (make-vector 4 0))


> ---------- Initial message -----------
> 
> Date    : Tue, 28 May 2002 05:17:33 -0400 (EDT)
> Subject : [plt-scheme] defining macros in mzscheme 103
> 
> hi all
> i am trying to define a macro like this
> (define-macro (new-core) `(make-vector 4 0))
> 	
> when i run this in mzscheme within emacs, it gives me
> the following error message:
> "define-macro: not an identifier at: (new-core) in
(define-macro 
> (new-core) (quasiquote ...)"
> 
> what is wrong?
> 
> thanks,
> Deva Seetharam


-- 
Sylvain Beucler
--------------
Profitez des 2 offres exceptionnelles Tiscali !
"Internet Gratuit le Jour" et "Modem ADSL remboursé"
Cliquez ici, http://register.tiscali.fr/forfaits_ls/
Offres soumises à conditions.