−A monoid consists of a set of values, an operation combining two of them, and an identity. The identity leaves any value unchanged when combined with it, serving as the empty batch and the seed for aggregation. The operation satisfies associativity: Combine(Combine(a, b), c) equals Combine(a, Combine(b, c)). Together, these rules allow partial results to be regrouped without changing the total. Below, the values are OrderStats records, the operation is Combine, and the identity is Empty.
+A monoid consists of a set of values, an operation combining two of them, and an identity that leaves any value unchanged when combined with it, serving as the empty batch and the seed for aggregation. The operation satisfies associativity: Combine(Combine(a, b), c) equals Combine(a, Combine(b, c)), allowing partial results to be regrouped without changing the total. Below, the values are OrderStats records, the operation is Combine, and the identity is Empty.