3 Healthy Habits for Programmers
For now you can think of a context as a box that you can put a value in:
Now when you apply a function to this value, you'll get different results depending on the context. This is the idea that Functors, Applicatives, Monads, Arrows etc are all based on.
I’m sure most developers will be familiar with the following project management joke: “I've set the wedding date. I've not asked her out yet." -How software projects are managed.
The nice thing about categories is this: it’s not just some pointless abstraction that a bunch of mathematicians made up. Categories are defined that way because people have looked at literally hundreds of things that all look sort of like functions with domains and ranges and compositions. Things from algebra, like groups and rings and vector spaces; things from analysis, like metric spaces and topological spaces; things from combinatorics, like elements of partially ordered sets and paths in graphs; things from formal logic and foundations, like proofs and propositions. Almost without fail, they can be described using all the ideas we just looked at! In short, categories are the right intuition for talking about composing things with domains and ranges, which is exactly the situation we’re in.
don't shoot yourself in your foot..
Monads are not hard; they are not easy; so what are they? They are profound.