saga

abstract suspend fun <A> saga(action: suspend SagaActionStep.() -> A, compensation: suspend (A) -> Unit): A(source)

Run an action to produce a value of type A and install a compensation to undo the action.