WhizzML Reference Manual

3.1 Programs

A WhizzML program consists of a sequence of expressions and definitions (cf. Chapter 2 ), and it evaluates to the value of the last expression in the program.

Definitions are only allowed at the top level, and they bind variable identifiers to values (including procedural values) at global scope.

Expressions and definitions in a program are evaluated sequentially. At the top level of a program, any expression of the form:

(prog <e1> ... <en>)

is totally equivalent to the sequence of expressions and definitions in the body of the prog, that is to the sequence of expressions

<e1>
...
<en>