Module higher::semigroup

source ·

Traits

A Semigroup is a type with an associative operation. In plain terms, this means you can take two values of this type and add them together into a different value of the same type. The most obvious example of this is addition of numbers: 2 + 2 = 4, another is string concatenation: "Hello " + "Joe" = "Hello Joe".