Welcome to the CHICKEN Scheme pasting service

macro expander added by klgg on Sat Oct 20 17:55:57 2012

(define-syntax glue-macro
  (syntax-rules ()
    ((_ name var-name var-value)
      (define-syntax name
      	(syntax-rules (var-name)
      	  ((_ expression)
      	    (worker-macros bind var-name var-value expression)))))))

(define-syntax worker-macros
  (syntax-rules (inline bind)
    ((_ inline name expression)
      (name expression))
    ((_ bind var-name var-value expression)
      (let-syntax ((f (syntax-rules () ((_ expression)
      		(let ((var-name var-value))
      		  expression)))))
      	(f expression)
      	))))

(glue-macro x y 1)
(print (worker-macros inline x (+ y y)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Name of the egg which implements this service:
Visually impaired? Let me spell it for you (wav file) download WAV