3 ms·
"I still don't understand how one can express a concept such as monoid or group in, say, Haskell." Roughly the same way one can express the concept in mathemat
by dllthomas 11y ago
"I still don't understand how one can express a concept such as monoid or group in, say, Haskell."
Roughly the same way one can express the concept in mathematics. You say "this set forms a monoid under that operation, with such-and-such identity element", and optionally include some argument (or, ideally, proof) that this is the case.
In (traditional/most) math, that is only checked by humans.
In Haskell, it is checked by humans and hopefully tests (laws often make great QuickCheck properties!).
- js8 11y agoThanks for both replies to my questions, I have asked additional question above.