arrow-fx / arrow.fx / arrow.Kind / repeatOrElse

repeatOrElse

fun <F, A, B> Kind<F, A>.~~repeatOrElse~~(CF: Concurrent<F>, schedule: Schedule<F, A, B>, orElse: (Throwable, Option<B>) -> Kind<F, B>): Kind<F, B> Deprecated: The IO datatype and it’s related type classes will disappear in Arrow 0.13.0. All useful operations are offered directly over suspend functions by Arrow Fx Coroutines. https://arrow-kt.io/docs/fx/async/

fun <F, E, A, B> Kind<F, A>.~~repeatOrElse~~(ME: MonadError<F, E>, T: Timer<F>, schedule: Schedule<F, A, B>, orElse: (E, Option<B>) -> Kind<F, B>): Kind<F, B> Deprecated: The IO datatype and it’s related type classes will disappear in Arrow 0.13.0. All useful operations are offered directly over suspend functions by Arrow Fx Coroutines. https://arrow-kt.io/docs/fx/async/

Run this effect once and, if it succeeded, decide using the passed 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
<