2 ms·
You can define monadic interfaces for lists because lists are monads. It would therefore be correct (but slightly pedantic) to talk about "the list monad". >
by pyrale 4y ago
You can define monadic interfaces for lists because lists are monads.
It would therefore be correct (but slightly pedantic) to talk about "the list monad".
> as you can with (probably all) parametric data types?
Actually, you can't. For instance, if you define a predicate type:
`data Predicate a = Predicate (a -> Bool)`
It is not a monad, it's not even a functor. (If you're interested in what it is you can look into contravariant functors).