Exemplo n.º 1
0
 /// <summary>
 /// Canonical representation of the coproduct.
 /// </summary>
 public static IProduct3 <int, int, object> CoproductRepresentation(this ICoproduct c)
 {
     return(Product3.Create(c.CoproductArity, c.CoproductDiscriminator, c.CoproductValue));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Converts the specified normalized function back to a standard function used in .NET.
 /// </summary>
 public static Func <T1, T2, T3, TResult> Denormalized <T1, T2, T3, TResult>(this Func <IProduct3 <T1, T2, T3>, TResult> f)
 {
     return((t1, t2, t3) => f(Product3.Create(t1, t2, t3)));
 }