3 ms·
You aren't describing Monads. You are describing a particular Monad. You can use the same 'monad pattern' for a variety of stuff such as state computations to
by runT1ME 14y ago
You aren't describing Monads. You are describing a particular Monad.
You can use the same 'monad pattern' for a variety of stuff such as state computations to mimic mutability, asynchronous pipelining, IO (which if i'm not mistaken is pretty similar to the async pipelining), etc.
A 'monad' is just a term for objects that have flatmap(scala)/selectmany(.NET)/bind(Haskell?) and for comprehension/Do notation is just a convenient pattern built into the languages for working with them.