Пример #1
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns true
 /// </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> repeatUntil <A>(Schedule schedule, Eff <A> ma, Func <A, bool> predicate) =>
 ScheduleEff <A> .RepeatUntil(ma, schedule, predicate);
Пример #2
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns true
 /// </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 Eff <A> repeatUntil <A>(Eff <A> ma, Func <A, bool> predicate) =>
 ScheduleEff <A> .RepeatUntil(ma, Schedule.Forever, predicate);
Пример #3
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns true
 /// </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> repeatUntil <RT, A>(Schedule schedule, Eff <RT, A> ma, Func <A, bool> predicate) where RT : struct =>
 ScheduleEff <RT, A> .RepeatUntil(ma, schedule, predicate);
Пример #4
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns true
 /// </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 Eff <RT, A> repeatUntil <RT, A>(Eff <RT, A> ma, Func <A, bool> predicate) where RT : struct =>
 ScheduleEff <RT, A> .RepeatUntil(ma, Schedule.Forever, predicate);