break x
Omitting x, and executing break, interrupts execution of a loop as above, returning null as the value of the function currently being evaluated, except, in the case of a for loop or a while loop with a list clause, the list accumulated so far is returned as the value.
|
Warning: trying to break from a loop controlled by table will probably not do what you expect, since table is implemented by two nested loops controlled by apply, and only the inner one will stop, as in the following example.
|
|
Here is an example as a debugger command.
|
|
|
|
|