; [ʞ] lisp-macro
;  ~ lexi hale <lexi@hale.su>
;  © affero general public license
;  > (load "lib/lisp-macro.scm")

; enable use of the define-macro syntax in chicken scheme
; ex:	(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))))))))
