Beispiel #1
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Func <L> Left) =>
 either.IfRightUnsafe(Left);
Beispiel #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);
Beispiel #3
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, L leftValue) =>
 either.IfRightUnsafe(leftValue);
Beispiel #4
0
 public static bool biforall <L, R>(EitherUnsafe <L, R> either, Func <R, bool> Right, Func <L, bool> Left) =>
 either.BiForAll(Right, Left);
Beispiel #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;
Beispiel #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);
Beispiel #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);
Beispiel #8
0
 public static EitherUnsafe <L, R> LeftUnsafe <L, R>(L value) =>
 EitherUnsafe <L, R> .Left(value);
Beispiel #9
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Func <R> Left) =>
 either.IfLeftUnsafe(Left);
Beispiel #10
0
 public static bool isLeft <L, R>(EitherUnsafe <L, R> value) =>
 value.IsLeft;
Beispiel #11
0
 public static EitherUnsafe <L, R> RightUnsafe <L, R>(R value) =>
 EitherUnsafe <L, R> .Right(value);
Beispiel #12
0
 public static bool isRight <L, R>(EitherUnsafe <L, R> value) =>
 value.IsRight;
Beispiel #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);
Beispiel #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);
Beispiel #15
0
 public static L ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Func <R, L> leftMap) =>
 either.IfRightUnsafe(leftMap);
Beispiel #16
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Func <L, R> leftMap) =>
 either.IfLeftUnsafe(leftMap);
Beispiel #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);
Beispiel #18
0
 public static R ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, R rightValue) =>
 either.IfLeftUnsafe(rightValue);
Beispiel #19
0
 public static S fold <S, L, R>(EitherUnsafe <L, R> either, S state, Func <S, R, S> folder) =>
 either.Fold(state, folder);
Beispiel #20
0
 public static Unit ifLeftUnsafe <L, R>(EitherUnsafe <L, R> either, Action <L> Left) =>
 either.IfLeftUnsafe(Left);
Beispiel #21
0
 public static bool forall <L, R>(EitherUnsafe <L, R> either, Func <R, bool> pred) =>
 either.ForAll(pred);
Beispiel #22
0
 public static Unit ifRightUnsafe <L, R>(EitherUnsafe <L, R> either, Action <R> Right) =>
 either.IfRightUnsafe(Right);
Beispiel #23
0
 public static int count <L, R>(EitherUnsafe <L, R> either) =>
 either.Count();
Beispiel #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);