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