How to I migrate this? `Or` does not work anymore....
# arrow
b
How to I migrate this?
Or
does not work anymore.
Copy code
val schedule = Schedule.exponential<Throwable>(scheduleBase, scheduleFactor)
            .or(Schedule.spaced(scheduleLimit))
            .and(Schedule.doWhile { state.first() == RUN })
s
Hey @benkuly, It seems there is indeed an overload missing for
or
with no
transform
and
combineDuration
argument.
thank you color 1
A current workaround:
Copy code
val schedule = Schedule.exponential<Throwable>(scheduleBase, scheduleFacto)
    .or(Schedule.spaced(scheduleLimit), transform = ::Pair) { a, b, -> minOf(a ?: ZERO, b ?: ZERO) }
    .and(Schedule.doWhile { state.first() == RUN })
👍 1