gosh> (define-macro hoge 'hoge) *** ERROR: Compile Error: procedure required, but got hoge "(stdin)":1:(define-macro hoge 'hoge) Stack Trace: _______________________________________
マクロは0個以上の引数を取る、手続きと同じ形でなくてはならないらしい。
gosh> (define-macro (foo) 'car) #<undef> gosh> (foo) #<subr car> gosh> (define-macro (bar) car) #<undef> gosh> (bar) #<subr car> gosh> (define-macro (baz) baz) #<undef> gosh> baz #<macro baz> gosh> (define-macro (qux) '(car '(1 2 3))) #<undef> gosh> (qux) 1 gosh> (define-macro (hoge) ''(foo bar baz)) #<undef> gosh> (hoge) (foo bar baz)
だめだ、全然話が広がらない!