3 ms·
My totally informal definition of monads is: "a monad is an island of stateful code in a sea of stateless FP code. On top of that we had some ". Someone correc
by leidenfrost 4y ago
My totally informal definition of monads is: "a monad is an island of stateful code in a sea of stateless FP code. On top of that we had some ".
Someone correct me if I'm wrong.
- light_hue_1 4y agoIt is indeed wrong. For example, the Maybe monad has no state. It sequences operations that can fail. The Error monad aborts the computation and returns an error. Similarly, Min, Max, Product, Sum, Dual don't have an state.