I have a function which returns `IO<A>` , wh...
# arrow
k
I have a function which returns
IO<A>
, where
A
is some
enum
having 3 different states:
Complete
,
Error
and
CustomError
. I want to retry the function until either
Complete
is returned, or a duration exceeded condition is true. What is the best way to do that with
IO
?
s
Using Schedule with repeat (technically from the IO perspective your function always succeeds) https://arrow-kt.io/docs/0.10/apidocs/arrow-fx/arrow.fx/-schedule/
☝️ 1