コード例 #1
0
 /// <summary>
 /// Invokes a predicate on the value of the Either if it's in the Right state
 /// </summary>
 /// <typeparam name="L">Left</typeparam>
 /// <typeparam name="R">Right</typeparam>
 /// <param name="self">Either to forall</param>
 /// <param name="Right">Right predicate</param>
 /// <param name="Left">Left predicate</param>
 /// <returns>True if the predicate returns True.  True if the Either is in a bottom state.</returns>
 public static bool forall <L, R>(EitherUnsafe <L, R> either, Func <R, bool> Right, Func <L, bool> Left) =>
 either.ForAll(Right, Left);
コード例 #2
0
 /// <summary>
 /// Invokes a predicate on the value of the Either if it's in the Right state
 /// </summary>
 /// <typeparam name="L">Left</typeparam>
 /// <typeparam name="R">Right</typeparam>
 /// <param name="either">Either to forall</param>
 /// <param name="pred">Predicate</param>
 /// <returns>True if the Either is in a Left state.
 /// True if the Either is in a Right state and the predicate returns True.
 /// False otherwise.</returns>
 public static bool forall <L, R>(EitherUnsafe <L, R> either, Func <L, bool> pred) =>
 either.ForAll(pred);