On this page:
at-end
in-phase1
in-phase1/ pass2
Version: 5.2.1

7 Definitions

Carl Eastlund <cce@racket-lang.org>

This library is unstable; compatibility will not be maintained. See Unstable: May Change Without Warning for more information.

 (require unstable/define)

Provides macros for creating and manipulating definitions.

(at-end expr)
When used at the top level of a module, evaluates expr at the end of the module. This can be useful for calling functions before their definitions.

Examples:

> (module Failure scheme
    (f 5)
    (define (f x) x))
> (require 'Failure)

reference to an identifier before its definition: f in

module: 'Failure

> (module Success scheme
    (require unstable/define)
    (at-end (f 5))
    (define (f x) x))
> (require 'Success)

Executes e during phase 1 (the syntax transformation phase) relative to its context, during pass 1 if it occurs in a head expansion position.

Executes e during phase 1 (the syntax transformation phase) relative to its context, during pass 2 (after head expansion).