4 ms·
Along the same line of this post is sigfpe's "You could have invented monads" http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html http://blog
by bsznjyewgd 11y ago
Along the same line of this post is sigfpe's "You could have invented monads" http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html http://blog.sigfpe.com/2006/08/you-could-have-invented-monad..., which has convinced me at least a few times over the years that I could have invented monads (until I promptly forget all about it the next day).
I just need someone to convince me that I could have invented monad transformers too, because while I now think I can use most of the common monads by themselves, trying to do multiple things at once just ends in (metaphorical) tears.
- quchen 11y agoMultiple things at once are still ordinary monads, and you can implement them without using transformers. Transformers are merely the realization that one can put (certain) monads together in a compositional way. An example of a monad in Haskell that is not put together via transformers, yet provides all their functionality, is RWS, being a combination of Reader, Writer and State in one hard-coded type/instance.