/** * Retries with the specified schedule, until it fails, and then both the * value produced by the schedule together with the last error are passed to * the recovery function. * * @tsplus static effect/core/io/Effect.Aspects retryOrElse * @tsplus pipeable effect/core/io/Effect retryOrElse */ export function retryOrElse( policy: Schedule, orElse: (e: E, out: A1) => Effect ) { return (self: Effect): Effect => self.retryOrElseEither(policy, orElse).map((either) => either.merge) }