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