Esempio n. 1
0
 public static T When <T>(this Monoid <T> monoid, bool c, T then) =>
 c ? then : monoid.Identity();
Esempio n. 2
0
 public static T Appends <T>(this Monoid <T> monoid, IEnumerable <T> x) =>
 x.Aggregate(monoid.Identity(), monoid.BinaryOperation);