
Ivan Lazar Miljenovic wrote:
Stephen Tetley
writes: On 3 July 2010 14:20, Andrew Coppin
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.
What do you consider "unusual"?
Not the usual flow control that you'd implement by simply chaining vanilla functions together. Maybe and similar error monads implement early exit. List and similar containers implement multiple execution in some order or other. There are monads that implement choice. Cont implements... uh, everything? Even STM, which is largely about state mutation, implements [very] unusual flow control - the flow is controlled by other concurrent threads!