Variables are declared using define
and define-global
. Variables declared with define
are available for use anywhere in subsequent expressions in the same scope, and define-global
makes them globally available.
do
evaluates multiple expressions, and itself evaluates to the value of the last expression.
Variables for a limited scope are introduced using let
:
You can see that let
accepts a list of names and values, called bindings, or it can work with a single binding. More than one expression can follow the bindings, which works like do
:
Variables and list values can be updated using set
, which evaluates to the value that it updated: