Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.


  1. Outdated egg!
  2. begin-syntax
  3. Description
  4. Usage
  5. Author
  6. License


This is a small extension that allows for inline macro operations.

The source for this extension is available here.


[syntax] (begin-syntax EXPR ...)

Evaluates its body and immediately inserts the final result into the program, as though by macro expansion.

If the result is a macro transformer, then this is immediately invoked with no arguments and the result is inserted into the program. Note that in this case the final expression of the begin-syntax body will be evaluated twice.

This form can be thought of as a macro definition followed by its immediate expansion, for example:

(begin-syntax '(+ 1 2))

; => (let-syntax ((a (er-macro-transformer
;                     (lambda (_ _ _) '(+ 1 2)))))
;      (a))


Evan Hanson


3-Clause BSD