+Assignment: set! in The Racket Guide introduces set! .
syntax
(set! idexpr)
Otherwise, evaluates expr and installs the result into the location for id, which must be bound as a local variable or defined as a top-level variable or module-level variable. If id refers to an imported binding, a syntax error is reported. If id refers to a top-level variable that has not been defined, the exn:fail:contract exception is raised.
See also compile-allow-set!-undefined .
> x13
6
set!: assignment disallowed;
cannot set variable before its definition
variable: i-am-not-defined
in module: top-level
syntax
( set!-values (id...)expr)
'(2 1)
More generally, the set!-values form is expanded to
which triggers further expansion if any id has a transformer binding to an assignment transformer.