[Haskell-cafe] Is my code too complicated?
andrewcoppin at btinternet.com
Sat Jul 3 10:04:06 EDT 2010
Stephen Tetley wrote:
> On 3 July 2010 14:20, Andrew Coppin <andrewcoppin at btinternet.com> wrote:
>> Tangentally, it seems to me that all monads can be described as doing zero
>> or more of:
>> - Invisibly pass state around (and possibly modify it).
>> - Perform unusual flow control.
>> - I/O (or some restricted subset of it).
>> Can anybody think of a monad that does something that doesn't fall under one
>> of these categories?
> The Identity monad of course.
> You did ask...
I said "does something that doesn't fall under one of these". The
identity monad, by contrast, does nothing that does fall under these.
:-P (It falls under zero of these.)
More information about the Haskell-Cafe