/// <summary> /// Keeps retrying the computation, until the scheduler expires /// </summary> /// <param name="schedule">Scheduler strategy for retrying</param> /// <param name="ma">Computation to retry</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <A> retry <A>(Schedule schedule, Eff <A> ma) => ScheduleEff <A> .Retry(ma, schedule);
/// <summary> /// Keeps retrying the computation, until the scheduler expires /// </summary> /// <param name="schedule">Scheduler strategy for retrying</param> /// <param name="ma">Computation to retry</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <RT, A> retry <RT, A>(Schedule schedule, Eff <RT, A> ma) where RT : struct => ScheduleEff <RT, A> .Retry(ma, schedule);
/// <summary> /// Keeps retrying the computation /// </summary> /// <param name="ma">Computation to retry</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <A> retry <A>(Eff <A> ma) => ScheduleEff <A> .Retry(ma, Schedule.Forever);
/// <summary> /// Keeps retrying the computation /// </summary> /// <param name="ma">Computation to retry</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <RT, A> retry <RT, A>(Eff <RT, A> ma) where RT : struct => ScheduleEff <RT, A> .Retry(ma, Schedule.Forever);
/// <summary> /// Keeps retrying the computation, until the scheduler expires /// </summary> /// <param name="schedule">Scheduler strategy for repeating</param> /// <param name="ma">Computation to repeat</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <A> Retry <A>(this Eff <A> ma, Schedule schedule) => ScheduleEff <A> .Retry(ma, schedule);
/// <summary> /// Keeps retrying the computation, until the scheduler expires /// </summary> /// <param name="schedule">Scheduler strategy for repeating</param> /// <param name="ma">Computation to repeat</param> /// <typeparam name="RT">Runtime</typeparam> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Eff <RT, A> Retry <RT, A>(this Eff <RT, A> ma, Schedule schedule) where RT : struct => ScheduleEff <RT, A> .Retry(ma, schedule);