3 ms·
Blocks can force a return in their defining scope. If you pass a block down through multiple methods and then call it, the return will exit the lexical scope th
by vidarh 1y ago
Blocks can force a return in their defining scope. If you pass a block down through multiple methods and then call it, the return will exit the lexical scope the block was defined in, not the method it was ultimately called from.
It usually looks pretty much the same, and so for most intents what you described is "close enough" to get most used of blocks.