3 ms·
So, I don't get all the pain. There are a lot of 'rules' around monads, but conceptually they are widgets in a workflow. In imperative programming you say wha
by jasallen 13y ago
So, I don't get all the pain. There are a lot of 'rules' around monads, but conceptually they are widgets in a workflow.
In imperative programming you say what you want to do and do it at the same time.
With monads, you assemble a chain, just like dropping boxes on a workflow UI. Just like a workflow, you have 'defined' what to do, but not done anything with it yet. When you give it input, the chain performs the transforms you have defined for it, and you can pull out the result.
Again, not a 'technical definition' but this paints a picture in people's heads that they can appreciate and follow it up with details.
For serious learning, I recommend Eric Lipperts blog post on the subject:
http://ericlippert.com/category/monads/ http://ericlippert.com/category/monads/