(global= name new-val)
  name: a sym
  new-val: any type
  returns #n
F
M

Assigns a new value to a global variable.

The symbol name must have been previously bound to a global variable, and that variable must not have been frozen. This function changes the value currently stored in the global variable.

Rather than calling global= directly, you should usually just write (= name new-val). This will attempt to mutate the global variable bound to name, unless it's currently shadowed by a local variable.

The ? special syntax is supported. (global= (? name) new-val) will succeed, and do nothing, if name is not currently bound to a global.

global
freeze-global!