예제 #1
0
 public static typeTo H**o <typeFrom, typeTo, left, right>(this typeFrom From, SSumProj <typeFrom, left, right> Alg, SSumInj <typeTo, left, right> CoAlg) =>
 Alg.Project(From, CoAlg.InjectLeft, CoAlg.InjectRight);
예제 #2
0
 public static typeTo BiMap <typeFrom, typeTo, left, right, leftˈ, rightˈ>(this typeFrom From, SSumProj <typeFrom, left, right> Alg, Func <left, leftˈ> Left, Func <right, rightˈ> Right, SSumInj <typeTo, leftˈ, rightˈ> CoAlg) =>
 Alg.Project(From, x => CoAlg.InjectLeft(Left(x)), x => CoAlg.InjectRight(Right(x)));
예제 #3
0
 public static res Project <type, left, right, res>(this SSumProj <type, left, right> Alg, type Value, Func <left, res> Left, Func <right, res> Right) =>
 Alg.Project(Value, Pair(Left, Right));