Skip to content

Instantly share code, notes, and snippets.

@sw17ch
Created September 21, 2011 15:46
Show Gist options
  • Save sw17ch/1232426 to your computer and use it in GitHub Desktop.
Save sw17ch/1232426 to your computer and use it in GitHub Desktop.
What I think a Monad is
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