|
|
|
|
|
by dmitriid
3247 days ago
|
|
The entire "concept" of a monad fits in that description I linked to. It can be easily reused (which I've done numerous times with it, and with other concepts on that page). Haskell for some reasons insists that I should only go for "The concept of a monad, which arises from category theory, has been applied by Moggi to structure the denotational semantics of programming languages" and A monad is a triple (M,unit,⋆) consisting of a type constructor M and two operations of the given
polymorphic types. These operations must satisfy three laws given in Section 3.
We will often write expressions in the form
m ⋆ λa. n
Should I? Really? |
|
They allow you to edit code without the aforementioned released-last-week test runner having to check all your code after a big refactor. I mean, you can't call something with a "flatMap" method and a "return" method a monad! There are tons of nonsensical definitions that fit that which are going to become very unpleasant to use quickly.