Code is generally executed line by line, in the order the expressions appear. This is called sequential execution. You can, however, change the order in which expressions are executed by using control flow expressions.
For example, you can make decisions about what expressions to execute next using if and case expressions, or repeat a sequence of expressions more than once with loop and for. The following pages describe these expressions in detail, and include examples of how to use them.
Profile
Learn how to instrument your code to measure performance.
Block
The block expression is how you nest code blocks, and behaves similarly to the general code blocks.
If
The if expression is how you make a decision, based on one or more conditions, about what expressions should be executed next.
Case
The case expression is how you make a decision, from a list of choices, about what expressions should be executed next.
Loop and Break
The loop expression repeats the expressions in its code block. End the loop with either a break or return.
For
The for expression iterates over a bounded number of items and repeats the expressions in its code block the same number of times.
Defer
Use the defer expression to execute code just before exiting the current scope.
Verse has more expressions you can use to change the time flow of a program by executing expressions simultaneously. For more details, see Concurrency.