3 Syntactic Forms🔗ℹ

This section describes the core syntax forms that appear in a fully expanded expression, plus many closely related non-core forms. See Fully Expanded Programs for the core grammar.

    3.1 Modules: module, module*, ...

    3.2 Importing and Exporting: require and provide

      3.2.1 Additional require Forms

      3.2.2 Additional provide Forms

    3.3 Literals: quote and #%datum

    3.4 Expression Wrapper: #%expression

    3.5 Variable References and #%top

    3.6 Locations: #%variable-reference

    3.7 Procedure Applications and #%app

    3.8 Procedure Expressions: lambda and case-lambda

    3.9 Local Binding: let, let*, letrec, ...

    3.10 Local Definitions: local

    3.11 Constructing Graphs: shared

    3.12 Conditionals: if, cond, and, and or

    3.13 Dispatch: case

      3.13.1 Variants of case

    3.14 Definitions: define, define-syntax, ...

      3.14.1 require Macros

      3.14.2 provide Macros

    3.15 Sequencing: begin, begin0, and begin-for-syntax

    3.16 Guarded Evaluation: when and unless

    3.17 Assignment: set! and set!-values

    3.18 Iterations and Comprehensions: for, for/list, ...

      3.18.1 Iteration and Comprehension Forms

      3.18.2 Deriving New Iteration Forms

      3.18.3 Iteration Expansion

      3.18.4 Do Loops

    3.19 Continuation Marks: with-continuation-mark

    3.20 Quasiquoting: quasiquote, unquote, and unquote-splicing

    3.21 Syntax Quoting: quote-syntax

    3.22 Interaction Wrapper: #%top-interaction

    3.23 Blocks: block

    3.24 Internal-Definition Limiting: #%stratified-body

    3.25 Performance Hints: begin-encourage-inline

    3.26 Importing Modules Lazily: lazy-require

Notation

Each syntactic form is described by a BNF-like notation that describes a combination of (syntax-wrapped) pairs, symbols, and other data (not a sequence of characters). These grammatical specifications are shown as in the following specification of a something form:

(something id thing-expr ...)
 
  thing-expr : number?

Within such specifications,