arrow-fx-coroutines / arrow.fx.coroutines / retryOrElse

retryOrElse

@JvmName("deprecatedRetryOrElse") suspend fun <A, B> ~~retryOrElse~~(schedule: Schedule<Throwable, B>, fa: suspend () -> A, orElse: suspend (Throwable, B) -> A): A Deprecated: retryOrElse has become an extension of Schedule

Runs an effect and, if it fails, decide using the provided policy if the effect should be retried and if so, with how much delay. Also offers a function to handle errors if they are encountered during retrial.

Do you like Arrow?

Arrow Org
<