For Gauche 0.9.5


Next: , Previous: , Up: Macros   [Contents][Index]

5.3 Traditional macros

Special Form: define-macro name procedure
Special Form: define-macro (name . formals) body …

Defines name to be a global macro whose transformer is procedure. The second form is a shorthand notation of the following form:

(define-macro name (lambda formals body …))

When a form (name arg …) is seen by the compiler, it calls procedure with arg …. When procedure returns, the compiler inserts the returned form in place of the original form, and compile it again.


Next: , Previous: , Up: Macros   [Contents][Index]