Ejemplo n.º 1
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)));
Ejemplo n.º 2
0
 public static type InjectRight <type, left, right>(this SSumInj <type, left, right> CoAlg, right Right) =>
 CoAlg.Inject(Right, Either <Func <right, left> > .Right <Func <right, right> >(x => x));
Ejemplo n.º 3
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);
Ejemplo n.º 4
0
 public static type InjectLeft <type, left, right>(this SSumInj <type, left, right> CoAlg, left Left) =>
 CoAlg.Inject(Left, Either <Func <left, right> > .Left <Func <left, left> >(x => x));