Beispiel #1
0
 public static Option <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, Option <B> > f) =>
 ta.Map(f).Sequence();
Beispiel #2
0
 public static Validation <Fail, EitherUnsafe <Fail, B> > Sequence <Fail, A, B>(this EitherUnsafe <Fail, A> ta, Func <A, Validation <Fail, B> > f) =>
 ta.Map(f).Sequence();
Beispiel #3
0
 public static Eff <RT, EitherUnsafe <L, B> > Sequence <RT, L, A, B>(this EitherUnsafe <L, A> ta, Func <A, Eff <RT, B> > f) where RT : struct =>
 ta.Map(f).Sequence();
Beispiel #4
0
 public static Que <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, Que <B> > f) =>
 ta.Map(f).Traverse(Prelude.identity);
Beispiel #5
0
 public static TryAsync <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, TryAsync <B> > f) =>
 ta.Map(f).Sequence();
 /// <summary>
 /// Bi-maps the value in the Either if it's in a Right state
 /// </summary>
 /// <typeparam name="L">Left</typeparam>
 /// <typeparam name="R">Right</typeparam>
 /// <typeparam name="LRet">Left return</typeparam>
 /// <typeparam name="RRet">Right return</typeparam>
 /// <param name="self">Either to map</param>
 /// <param name="Right">Right map function</param>
 /// <param name="Left">Left map function</param>
 /// <returns>Mapped Either</returns>
 public static EitherUnsafe <LRet, RRet> map <L, R, LRet, RRet>(EitherUnsafe <L, R> either, Func <R, RRet> Right, Func <L, LRet> Left) =>
 either.Map(Right, Left);
Beispiel #7
0
 public static Either <L, EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, Either <L, B> > f) =>
 ta.Map(f).Sequence();
 public static IEnumerable <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ma, Func <A, IEnumerable <B> > f) =>
 ma.Map(f).Sequence();
 /// <summary>
 /// Maps the value in the Either if it's in a Right state
 /// </summary>
 /// <typeparam name="L">Left</typeparam>
 /// <typeparam name="R">Right</typeparam>
 /// <typeparam name="Ret">Mapped Either type</typeparam>
 /// <param name="either">Either to map</param>
 /// <param name="mapper">Map function</param>
 /// <returns>Mapped Either</returns>
 public static EitherUnsafe <Ret, R> map <L, R, Ret>(EitherUnsafe <L, R> either, Func <L, Ret> mapper) =>
 either.Map(mapper);
Beispiel #10
0
 public static HashSet <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, HashSet <B> > f) =>
 ta.Map(f).Sequence();
Beispiel #11
0
 public static ValueTask <EitherUnsafe <L, B> > Sequence <L, A, B>(this EitherUnsafe <L, A> ta, Func <A, ValueTask <B> > f) =>
 ta.Map(f).Sequence();
Beispiel #12
0
 public static Validation <MonoidFail, Fail, EitherUnsafe <Fail, B> > Sequence <MonoidFail, Fail, A, B>(this EitherUnsafe <Fail, A> ta, Func <A, Validation <MonoidFail, Fail, B> > f)
     where MonoidFail : struct, Monoid <Fail>, Eq <Fail> =>
 ta.Map(f).Traverse(Prelude.identity);
 /// <summary>
 /// Partial application map
 /// </summary>
 /// <remarks>TODO: Better documentation of this function</remarks>
 public static EitherUnsafe <L, Func <T2, Func <T3, R> > > map <L, T1, T2, T3, R>(EitherUnsafe <L, T1> either, Func <T1, T2, T3, R> func) =>
 either.Map(func);
Beispiel #14
0
 public static Aff <RT, EitherUnsafe <L, B> > Sequence <RT, L, A, B>(this EitherUnsafe <L, A> ta, Func <A, Aff <RT, B> > f)
     where RT : struct, HasCancel <RT> =>
 ta.Map(f).Sequence();