SemigroupLaw
trait SemigroupLaw
A semigroup in type F must satisfy two laws:
- '''closure''':
∀ a, b in F, append(a, b)
is also inF
. This is enforced by the type system. - '''associativity''':
∀ a, b, c
inF
, the equationappend(append(a, b), c) = append(a, append(b , c))
holds.