Created
September 21, 2011 15:46
-
-
Save sw17ch/1232426 to your computer and use it in GitHub Desktop.
What I think a Monad is
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A monad is a datatype used to describe actions. Wait, what? What do you mean | |
'describe an action'?! | |
Well, at least in Haskell, we're not really using actions or statements; we're | |
using mathematical transformations. But sometimes, we really want to think of | |
something a 'doing' something to another thing. In those circumstances, due to | |
Haskell's semantics, we need a sort of mathematical description of what 'doing | |
something to something else' means. | |
The mathematical abstraction of this is a monad. | |
[I am not a category theorist, so this is probably completely wrong, but this | |
definition works for me.] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment