procgen  Artifact [ad02b3f2ba]

Artifact ad02b3f2ba208f2b0180262de0802c04681afc12ec5863f10e0d39a2cdf2fcd2:


; [ʞ] 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))))))))