News for hackers. Stuff that matters.
Re:Inventing Monads by raiflip on Saturday August 29, 2020 @04:18PM (#24319130)
A monad really is just a wrapper around a value, with flatMap and return.

For some kinds of monads, like maybe, that’s all you need.

But, some other kinds of monads need more logic. List is one, IO is another.

In OOP language, sometimes all you need is the parent class. But sometimes you need to extend the parent and add more.

Re:Inventing Monads by ratww on Saturday August 29, 2020 @06:40PM (#24319923)
It's actually more like an abstract class! Even the Maybe monad has some implementation, it's just super simple :)

https://hackage.haskell.org/package/base-4.14.0.0/docs/src/G...

Re:Inventing Monads by raiflip on Sunday August 30, 2020 @10:48AM (#24323277)
Totally agree, that’s a good point.