Associative operation taking which combines two values.
Given a sequence of as
, combine them and return the total.
Given a sequence of as
, combine them and return the total.
If the sequence is empty, returns None. Otherwise, returns Some(total).
A semigroup is any type
A
with an associative operation (combine
). This object defines thecombine
option for some typeA