while p list x do z
|
The list x clause may be omitted, in which case no list is accumulated, and null is returned as the value of the expression.
|
Alternatively, the do z clause may be omitted.
|
Observe the use of the semicolon (see ;) in the expression above.
If continue is executed by x then execution of x is interrupted, no value is added to the list, and iteration of the loop continues.
|
If continue w is executed by x then execution of x is interrupted, the value of w is added to the list, and iteration of the loop continues.
|
If break v is executed by x, then the loop is stopped and v is returned as its value.
|
If break is executed by x, then the loop is stopped and the list accumulated so far is returned as the value.
|