scsh-0.6/scheme/alt/schemetoc-define-syntax.scm

14 lines
361 B
Scheme
Raw Permalink Normal View History

2002-04-04 03:36:20 -05:00
; Copyright (c) 1993-2001 by Richard Kelsey and Jonathan Rees. See file COPYING.
(define-macro define-syntax
(lambda (form expander)
(expander `(define-macro ,(cadr form)
(let ((transformer ,(caddr form)))
(lambda (form expander)
(expander (transformer form
(lambda (x) x)
eq?)
expander))))
expander)))