pakoito
03/10/2019, 3:57 AMkartoffelsup
03/10/2019, 7:39 AMfun <E, A> Kind<F, A>.withRetry(err: E, AE: ApplicativeError<F, E>, retries: Int) =
if (retries == 0) AE.raiseError(err)
else AE. run { this.handleErrorWith { withRetry(it,AE, retries - 1) } }
Wouldn't that just call itself until 0 without any other possible outcome?pakoito
03/10/2019, 12:38 PMpakoito
03/10/2019, 12:39 PMthis
failspakoito
03/10/2019, 12:39 PMIO
is a lazy, suspended datatypepakoito
03/10/2019, 12:40 PM