procgen  lisp-macro.scm at [6822b7d006]

File lib/lisp-macro.scm artifact abec99f409 part of check-in 6822b7d006


; [ʞ] lisp-macro
; enable use of the define-macro syntax
; - example -
; 		(define-macro (if-or-f . body)
;			`(if ,(car body) ,(cadr body) #f))

(define-syntax define-macro
	(er-macro-transformer (lambda (exp r c)
		`(define-syntax ,(caadr exp)
			(er-macro-transformer
				(lambda (,(cdadr exp) id-rename id-compare)
					(let ((,(cdadr exp) (cdr ,(cdadr exp))))
			 			,@(cddr exp))))))))