Exemple #1
0
 public static Validation <string, R> RunValidation <V, R>(this Yoneda <V, R> @this) => ((Validation <string, V>)@this.Functor).Map(@this.Transform);
Exemple #2
0
 public static Either <string, R> RunEither <V, R>(this Yoneda <V, R> @this) => ((Either <string, V>)@this.Functor).Map(@this.Transform);
Exemple #3
0
 public static Result <R> RunResult <V, R>(this Yoneda <V, R> @this) => ((Result <V>)@this.Functor).Map(@this.Transform);
Exemple #4
0
 public static IEnumerable <R> RunIEnumerable <V, R>(this Yoneda <V, R> @this) => ((IEnumerable <V>)@this.Functor).Map((V v) => @this.Transform(v));
Exemple #5
0
 public static Maybe <R> RunMaybe <V, R>(this Yoneda <V, R> @this) => ((Maybe <V>)@this.Functor).Map(@this.Transform);
Exemple #6
0
 public static Identity <R> RunIdentity <V, R>(this Yoneda <V, R> @this) => ((Identity <V>)@this.Functor).Map(@this.Transform);
Exemple #7
0
 public static Yoneda <A, C> Select <A, B, C>(this Yoneda <A, B> @this, Func <B, C> f) => @this.Map(f);
Exemple #8
0
 public static Yoneda <A, C> Map <A, B, C>(this Yoneda <A, B> @this, Func <B, C> g) => new Yoneda <A, C>(@this.Functor, a => g(@this.Transform(a)));