TODO: Discuss what summers are, and improve the documentation below on StatefulSummer.


A Stateful summer is something that is potentially more efficient (a buffer, a cache, etc…) that has the same result as a sum:

Law 1: Semigroup.sumOption(items) ==
  ( { stateful.put(_) }.filter { _.isDefined }, stateful.flush) &&
Law 2: isFlushed == flush.isEmpty

Documentation Help

We’d love your help fleshing out this documentation! You can edit this page in your browser by clicking this link. These links might be helpful: