How can I make that 0.11.0 compliant: ``` fun <...
# arrow
b
How can I make that 0.11.0 compliant:
Copy code
fun <A> IO<Nothing, A>.retry(shouldRetry: (count: Int, error: Throwable) -> Boolean): IO<Throwable, A> =
    handleErrorWith { withRetry(it, 1, shouldRetry) }

fun <A> IO<Throwable, A>.withRetry(err: Throwable, count: Int, shouldRetry: (count: Int, error: Throwable) -> Boolean): IO<Throwable, A> =
    if (!shouldRetry(count, err)) IO.raiseError(err)
    else handleErrorWith {
        withRetry(it, count + 1, shouldRetry)
    }