/** * Retries with the specified retry policy. Retries are done following the * failure of the original `io` (up to a fixed maximum with `once` or `recurs` * for example), so that that `io.retry(Schedule.once)` means "execute `io` * and in case of failure, try again once". * * @tsplus static effect/core/io/Effect.Aspects retry * @tsplus pipeable effect/core/io/Effect retry */ export function retry(policy: Schedule) { return (self: Effect): Effect => self.retryOrElse(policy, (e, _) => Effect.fail(e)) }