/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <param name="ma">Computation to repeat</param> /// <param name="schedule">Scheduler strategy for repeating</param> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Aff <A> Repeat <A>(this Aff <A> ma, Schedule schedule) => ScheduleAff <A> .Repeat(ma, schedule);
/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <param name="ma">Computation to repeat</param> /// <param name="schedule">Scheduler strategy for repeating</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 Aff <RT, A> Repeat <RT, A>(this Aff <RT, A> ma, Schedule schedule) where RT : struct, HasCancel <RT> => ScheduleAff <RT, A> .Repeat(ma, schedule);
/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <param name="ma">Computation to repeat</param> /// <typeparam name="A">Computation bound value type</typeparam> /// <returns>The result of the last invocation of ma</returns> public static Aff <A> Repeat <A>(this Aff <A> ma) => ScheduleAff <A> .Repeat(ma, Schedule.Forever);
/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <param name="ma">Computation to repeat</param> /// <param name="schedule">Scheduler strategy for repeating</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 Aff <A> repeat <A>(Schedule schedule, Aff <A> ma) => ScheduleAff <A> .Repeat(ma, schedule);
/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <param name="ma">Computation to repeat</param> /// <param name="schedule">Scheduler strategy for repeating</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 Aff <RT, A> repeat <RT, A>(Schedule schedule, Aff <RT, A> ma) where RT : struct, HasCancel <RT> => ScheduleAff <RT, A> .Repeat(ma, schedule);
/// <summary> /// Keeps repeating the computation until it fails /// </summary> /// <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 Aff <RT, A> repeat <RT, A>(Aff <RT, A> ma) where RT : struct, HasCancel <RT> => ScheduleAff <RT, A> .Repeat(ma, Schedule.Forever);