begin-syntax

  1. begin-syntax
  2. Description
  3. Usage
  4. Author
  5. Repository
  6. License

Description

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

The source for this extension is available here.

Usage

[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, it is immediately invoked with no arguments and the result is inserted into the program.

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))

Author

Evan Hanson

Repository

https://git.foldling.org/chicken-begin-syntax/

License

3-Clause BSD