# repeatOnFailure

inline fun < R > repeatOnFailure (onFailure: ( Throwable ) -> Boolean , action: () -> R ): Result < R >(source)

Executes the given action until getting of successful result specified number of times.

A zero-based index of current iteration is passed as a parameter to action.

inline fun < R > repeatOnFailure (times: Int , onEachFailure: ( Throwable ) -> Unit = {}, action: ( Int ) -> R ): Optional < R >(source)

Executes the given action until getting of successful result specified number of times.

A zero-based index of current iteration is passed as a parameter to action.