run Sync
Executes the computation synchronously, returning a default value on failure.
Return
The result of the computation, or the default value if it fails.
Parameters
default Value On Failure
The default value to return if the computation fails.
block
A DSL block to customize the handling of success and failure outcomes.
open fun runSync(defaultValueOnFailure: suspend () -> A, block: suspend Effect.RunDSL<A>.() -> Unit = {}): A
Executes the computation synchronously, using a suspendable default value provider on failure.
Return
The result of the computation, or the default value if it fails.
Parameters
default Value On Failure
A suspendable function that provides the default value if the computation fails.
block
A DSL block to customize the handling of success and failure outcomes.