コード例 #1
0
 /// <summary>
 /// Fold over the effect repeatedly until the effect fails
 /// </summary>
 /// <param name="ma">Effect to fold over</param>
 /// <param name="state">Initial state</param>
 /// <param name="fold">Folder function</param>
 /// <typeparam name="RT">Runtime</typeparam>
 /// <typeparam name="S">State type</typeparam>
 /// <typeparam name="A">Bound value type</typeparam>
 /// <returns>The result of the fold operation</returns>
 public static Eff <RT, S> fold <RT, S, A>(Eff <RT, A> ma, S state, Func <S, A, S> fold) where RT : struct =>
 ScheduleEff <RT, A> .Fold(ma, Schedule.Forever, state, fold);
コード例 #2
0
 /// <summary>
 /// Fold over the effect repeatedly until the effect fails
 /// </summary>
 /// <param name="ma">Effect to fold over</param>
 /// <param name="state">Initial state</param>
 /// <param name="fold">Folder function</param>
 /// <typeparam name="S">State type</typeparam>
 /// <typeparam name="A">Bound value type</typeparam>
 /// <returns>The result of the fold operation</returns>
 public static Eff <S> fold <S, A>(Eff <A> ma, S state, Func <S, A, S> fold) =>
 ScheduleEff <A> .Fold(ma, Schedule.Forever, state, fold);
コード例 #3
0
 /// <summary>
 /// Fold over the effect repeatedly until the schedule expires or the effect fails
 /// </summary>
 /// <param name="ma">Effect to fold over</param>
 /// <param name="schedule">Scheduler that controls the number of folds and the delay between each fold iteration</param>
 /// <param name="state">Initial state</param>
 /// <param name="fold">Folder function</param>
 /// <typeparam name="RT">Runtime</typeparam>
 /// <typeparam name="S">State type</typeparam>
 /// <typeparam name="A">Bound value type</typeparam>
 /// <returns>The result of the fold operation</returns>
 public static Eff <RT, S> fold <RT, S, A>(Schedule schedule, Eff <RT, A> ma, S state, Func <S, A, S> fold) where RT : struct =>
 ScheduleEff <RT, A> .Fold(ma, schedule, state, fold);
コード例 #4
0
 /// <summary>
 /// Fold over the effect repeatedly until the schedule expires or the effect fails
 /// </summary>
 /// <param name="ma">Effect to fold over</param>
 /// <param name="schedule">Scheduler that controls the number of folds and the delay between each fold iteration</param>
 /// <param name="state">Initial state</param>
 /// <param name="fold">Folder function</param>
 /// <typeparam name="S">State type</typeparam>
 /// <typeparam name="A">Bound value type</typeparam>
 /// <returns>The result of the fold operation</returns>
 public static Eff <S> fold <S, A>(Schedule schedule, Eff <A> ma, S state, Func <S, A, S> fold) =>
 ScheduleEff <A> .Fold(ma, schedule, state, fold);