//arrow-fx-coroutines/arrow.fx.coroutines/Schedule/repeatOrElse

repeatOrElse

common suspend fun repeatOrElse(fa: suspend () -> Input, orElse: suspend (Throwable, Output?) -> Output): Output

Runs this effect once and, if it succeeded, decide using the provided policy if the effect should be repeated and if so, with how much delay. Also offers a function to handle errors if they are encountered during repetition.

Do you like Arrow?

Arrow Org
<