One of the simplest and most recognizable type classes is the semigroup. This type class abstracts over the ability to combine values of a certain type in an associative manner.
Cats provides cats.Semigroup[A]
to model semigroups [1].
The combine
method takes two values of the type A
and returns an A
value.