`setq`

and sequencing is specified by the special operator `progn`

.
`setq`

, which looks like this:
`(setq`

*identifer*
*expression*`)`

The *expression* is evaluated and *identifier* is updated
with the result. The result of the `setq`

expression is the value
of *expression*. Here are some examples:

```
DEBUG> top:
```

```
In the first example, we have changed the value of
````ticks-per-second`

to `4`

... not a good idea in
general! We can also try to update `nil`

, however, this is not
permitted.
## progn

If you are writing a program that depends on operations being done in a
particular order, then you need to sequence them explicitly. The special
operator in Lisp is called `progn`

and is equivalent to Pascal's
`begin`

... `end`

or C's
`{`

... `}`

. It looks like this:
`(progn`

*exp-1* ...
*exp-n*`)`

Each of the expressions *exp-1* to *exp-n* is evaluated
*in order*. The result of `progn`

is
*exp-n*.

The most common occurrence of `progn`

is in the consequent
or alternative branches of an `if`

expression. Note that it is
not needed in `cond`

expressions, since the consequent in each
case, can be a sequence of expressions.

Julian Padget, jap@maths.bath.ac.uk, this version January 12, 1995