A block closure is an anonymous function construct written as void^(void){ ... }. The ^ replaces a function name, and a following () invokes the closure immediately without arguments. section 18.4
Immediate SWAP operation
A SWAP macro can place its exchange logic inside a block closure, then call it immediately: void^(void){ /* exchange values */ }(). The closure can read variables from surrounding scopes, but modification requires specially marked variables. section 18.4
Key rules:
- Read surrounding variables by default. section 18.4
- Permit modification only for specially marked variables. section 18.4
- Terminate at the body’s end or at a return statement. section 18.4



















