break exits a for or for* loop.

Syntax

(break)
(break label)

Semantics

  • Without a label, break exits the innermost loop.
  • With a label, it exits the named enclosing loop.
  • It is the main structured early-exit mechanism for imperative loops.

Example

(for :outer ()
  (for :inner ()
    (when satisfied?
      (break))
    (when done?
      (break :outer))))