folding
inline suspend fun <In, Out, Error> RaiseScope<Error>.folding(block: suspend (scope: RaiseScope<Error>) -> In, catch: (Exception) -> Out = ::rethrow, recover: suspend (error: Error) -> Out, transform: suspend (value: In) -> Out): Out
Suspend variant of fold that propagates CancellationException for structured concurrency.
Executes block within this RaiseScope:
On shortCircuit, calls close and applies recover.
On thrown Exception, calls ensureActive then close and applies catch.
Return
Parameters
block
The suspend block to execute within this scope.