14. Monads
In simple terms
-- supports Map
obj.map(f).map(g) == obj.map(g~f)
-- pointed -- A way to lift values
Containers with functionality that supports
associativity and identity
○ Arrays
○ Promises
○ And much more
There are two ways to get a value out of a function
-- Return path
-- Exception path
Javascript is safe in most of the cases since it is single threaded.
Think of this in Java terms
Mutual exclusions
Dead locks / Starvation
Even in Javascript if you have concurrent browser tabs accessing network or local storage