2.2.1.1 The exit-variable of a block is bound to a continuation
block [Statement]
Executes a body with several options for nonstandard flow of control.
Macro Call:
block ( [ exit-variable ] )
[ block-body ]
[ afterwards [ afterwards-clause ] ]
[ cleanup [ cleanup-clause ] ]
{ exception exception-clause }*
end [ block ]
Description:
block executes the expressions in the block-body in order, and then executes the optional afterwards-clause and cleanup-clause. Unless there is a nonlocal exit, block returns the values of the block-body, or #f if there is no block-body.
If exit-variable is provided, it is bound to an exit procedure (an object of type <function>) that is valid during the execution of the block body and the clauses. At any point in time before the last clause returns, the exit procedure can be called. Calling the exit procedure has the effect of immediately terminating the execution of the block, and returning as values the arguments to the exit procedure.