Re:Algebraic patterns – Semigroup
by wereHamster on Sunday July 17, 2016 @08:19AM
(#12109942)
The person who implements Semigroup for a data type must ensure that the laws hold.
[ Parent
| on HN ]
Which is where property based testing really shines. Still requires the implementer to be a good citizen and write those tests though.
AKA QuickCheck. https://en.wikipedia.org/wiki/QuickCheck