/// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns false
 /// </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> RepeatWhile <A>(this Aff <A> ma, Schedule schedule, Func <A, bool> predicate) =>
 ScheduleAff <A> .RepeatWhile(ma, schedule, predicate);
예제 #2
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns false
 /// </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 <A> repeatWhile <A>(Aff <A> ma, Func <A, bool> predicate) =>
 ScheduleAff <A> .RepeatWhile(ma, Schedule.Forever, predicate);
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns false
 /// </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> RepeatWhile <RT, A>(this Aff <RT, A> ma, Schedule schedule, Func <A, bool> predicate) where RT : struct, HasCancel <RT> =>
 ScheduleAff <RT, A> .RepeatWhile(ma, schedule, predicate);
예제 #4
0
 /// <summary>
 /// Keeps repeating the computation until it fails or the predicate returns false
 /// </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> repeatWhile <RT, A>(Aff <RT, A> ma, Func <A, bool> predicate) where RT : struct, HasCancel <RT> =>
 ScheduleAff <RT, A> .RepeatWhile(ma, Schedule.Forever, predicate);