News for hackers. Stuff that matters.
Re:Are Monads a Waste of Time? by pdpi on Tuesday February 20, 2018 @01:56PM (#16422912)
If that were true, why do you need a monad for sequencing? Why doesn’t function composition suffice, or something of the form a -> (a -> b) -> b?
Re:Are Monads a Waste of Time? by tree_of_item on Tuesday February 20, 2018 @02:57PM (#16423596)
Because the values have extra "stuff" surrounding them. That's why it's `m a` and not just `a`: the `m` holds the invisible context that enriches the `a`.

Although your example is exactly what's happening in the identity monad, because there is no extra stuff.

Re:Are Monads a Waste of Time? by gowld on Wednesday February 21, 2018 @02:00AM (#16427471)
Monads have been called "executable semicolons", because you can define a function to be executed each time the program passes from one statement to the next.