4 ms·
Because the values have extra "stuff" surrounding them. That's why it's `m a` and not just `a`: the `m` holds the invisible context that enriches the `a`. Alth
by tree_of_item 9y ago
Because the values have extra "stuff" surrounding them. That's why it's `m a` and not just `a`: the `m` holds the invisible context that enriches the `a`.
Although your example is exactly what's happening in the identity monad, because there is no extra stuff.
- gowld 9y agoMonads have been called "executable semicolons", because you can define a function to be executed each time the program passes from one statement to the next.