A type that can be treated as a difference.
Differential dataflow most commonly tracks the counts associated with records in a multiset, but it generalizes to tracking any map from the records to an Abelian group. The most common generalization is when we maintain both a count and another accumulation, for example height. The differential dataflow collections would then track for each record the total of counts and heights, which allows us to track something like the average.
The difference defined by a pair of difference elements.
A variable number of accumulable updates.
A zero-sized difference that indicates the presence of a record.
A semigroup with an explicit zero element.
A type with addition and a test for zero.