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