You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
781 B
Racket
18 lines
781 B
Racket
#lang quadwriter/markdown
|
|
|
|
|
|
A _macro_ is a syntactic form with an associated _transformer_ that
|
|
_expands_ the original form into existing forms. To put it another way,
|
|
a macro is an extension to the Racket compiler. Most of the syntactic
|
|
forms of `racket/base` and `racket` are actually macros that expand into
|
|
a small set of core constructs.
|
|
|
|
Like many languages, Racket provides pattern-based macros that make
|
|
simple transformations easy to implement and reliable to use. Racket
|
|
also supports arbitrary macro transformers that are implemented in
|
|
Racket—or in a macro-extended variant of Racket.
|
|
|
|
This chapter provides an introduction to Racket macros, but see [_Fear
|
|
of Macros_](http://www.greghendershott.com/fear-of-macros/) for an
|
|
introduction from a different perspective.
|