예제 #1
0
 public static Union4 <I0, I1, I2, I3> From123(Union3 <I1, I2, I3> o) => o.Match(From1, From2, From3);
예제 #2
0
 public Union3 <A, B, C> Select <A, B, C>(Func <I0, A> f0, Func <I1, B> f1, Func <I2, C> f2) => Match(i0 => Union3 <A, B, C> .From0(f0(i0)), i1 => Union3 <A, B, C> .From1(f1(i1)), i2 => Union3 <A, B, C> .From2(f2(i2)));
예제 #3
0
 public static Union4 <I0, I1, I2, I3> From012(Union3 <I0, I1, I2> o) => o.Match(From0, From1, From2);
예제 #4
0
 public Union3 <II0, II1, II2> Map <II0, II1, II2>(Func <I0, II0> f0, Func <I1, II1> f1, Func <I2, II2> f2) =>
 Match(
     x => Union3 <II0, II1, II2> .From0(f0(x)),
     x => Union3 <II0, II1, II2> .From1(f1(x)),
     x => Union3 <II0, II1, II2> .From2(f2(x)));