示例#1
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Func <L> Left) =>
 either.IfRightUnsafe(Left);
示例#2
0
 public static EitherUnsafe <L, R> plus <NUM, L, R>(EitherUnsafe <L, R> x, EitherUnsafe <L, R> y) where NUM : struct, Num <R> =>
 from a in x
 from b in y
 select default(NUM).Plus(a, b);
示例#3
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, L leftValue) =>
 either.IfRightUnsafe(leftValue);
示例#4
0
 public static bool biforall <L, R>(EitherUnsafe <L, R> either, Func <R, bool> Right, Func <L, bool> Left) =>
 either.BiForAll(Right, Left);
示例#5
0
 public static EitherUnsafe <L, Func <B, C> > apply <L, A, B, C>(EitherUnsafe <L, Func <A, B, C> > fabc, EitherUnsafe <L, A> fa) =>
 from x in fabc
 from y in ApplEitherUnsafe <L, A, B, C> .Inst.Apply(curry(x), fa)
 select y;
示例#6
0
 /// <summary>
 /// Invokes the Right or Left action depending on the state of the Either provided
 /// </summary>
 /// <typeparam name="L">Left</typeparam>
 /// <typeparam name="R">Right</typeparam>
 /// <param name="either">Either to match</param>
 /// <param name="Right">Action to invoke if in a Right state</param>
 /// <param name="Left">Action to invoke if in a Left state</param>
 /// <returns>Unit</returns>
 public static Unit matchUnsafe <L, R>(EitherUnsafe <L, R> either, Action <R> Right, Action <L> Left) =>
 either.MatchUnsafe(Right, Left);
示例#7
0
 public static S bifold <L, R, S>(EitherUnsafe <L, R> either, S state, Func <S, R, S> Right, Func <S, L, S> Left) =>
 either.BiFold(state, Right, Left);
示例#8
0
 public static EitherUnsafe <L, R> LeftUnsafe <L, R>(L value) =>
 EitherUnsafe <L, R> .Left(value);
示例#9
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Func <R> Left) =>
 either.IfLeftUnsafe(Left);
示例#10
0
 public static bool isLeft <L, R>(EitherUnsafe <L, R> value) =>
 value.IsLeft;
示例#11
0
 public static EitherUnsafe <L, R> RightUnsafe <L, R>(R value) =>
 EitherUnsafe <L, R> .Right(value);
示例#12
0
 public static bool isRight <L, R>(EitherUnsafe <L, R> value) =>
 value.IsRight;
示例#13
0
 public static EitherUnsafe <L, B> action <L, A, B>(EitherUnsafe <L, A> fa, EitherUnsafe <L, B> fb) =>
 ApplEitherUnsafe <L, A, B> .Inst.Action(fa, fb);
示例#14
0
 public static EitherUnsafe <L, Func <B, C> > apply <L, A, B, C>(Func <A, Func <B, C> > fabc, EitherUnsafe <L, A> fa) =>
 ApplEitherUnsafe <L, A, B, C> .Inst.Apply(fabc, fa);
示例#15
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Func <R, L> leftMap) =>
 either.IfRightUnsafe(leftMap);
示例#16
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Func <L, R> leftMap) =>
 either.IfLeftUnsafe(leftMap);
示例#17
0
 public static Ret matchUnsafe <L, R, Ret>(EitherUnsafe <L, R> either, Func <R, Ret> Right, Func <L, Ret> Left) =>
 either.MatchUnsafe(Right, Left);
示例#18
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, R rightValue) =>
 either.IfLeftUnsafe(rightValue);
示例#19
0
 public static S fold <S, L, R>(EitherUnsafe <L, R> either, S state, Func <S, R, S> folder) =>
 either.Fold(state, folder);
示例#20
0
 public static Unit ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Action <L> Left) =>
 either.IfLeftUnsafe(Left);
示例#21
0
 public static bool forall <L, R>(EitherUnsafe <L, R> either, Func <R, bool> pred) =>
 either.ForAll(pred);
示例#22
0
 public static Unit ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Action <R> Right) =>
 either.IfRightUnsafe(Right);
示例#23
0
 public static int count <L, R>(EitherUnsafe <L, R> either) =>
 either.Count();
示例#24
0
 public static EitherUnsafe <L, C> apply <L, A, B, C>(Func <A, B, C> fabc, EitherUnsafe <L, A> fa, EitherUnsafe <L, B> fb) =>
 ApplEitherUnsafe <L, A, B, C> .Inst.Apply(curry(fabc), fa, fb);