4 ms·
I don't like being adversarial but this is wrong. https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell/13-the-list-monad https://www.
by nightski 4y ago
I don't like being adversarial but this is wrong. https://www.schoolofhaskell.com/school/starting-with-haskell/basics-of-haskell/13-the-list-monad https://www.schoolofhaskell.com/school/starting-with-haskell...
A list is absolutely a monad.
- sudosysgen 4y agoThe Haskell list is implemented as a monad. A list in general isn't a monad. You can use Monads to implement lists, but that doesn't make them Monads anymore than saying that lists are generic container classes.
- nightski 4y agoDo you have an example of a list, which meets the mathematical definition, which would not be able satisfy the requirements of a monad? Meaning one could not write a bind or lift operation for that list?
- sudosysgen 4y agoNo, you deeply misunderstand what a monad is. Monad doesn't mean you can write the bind and lift operations, a monad contains the bind and lift operation. The bind and lift operation is a component of the monad. You could probably shoehorn some kind of bind and lift into any conceivable generic type.
- pyrale 4y ago> You could probably shoehorn some kind of bind and lift into any conceivable generic type. You actually can't implement Monad for most contravariant functors.