This document outlines functional programming concepts like pure functions, shared mutable state, null, and monads. It discusses how pure functions have no side effects or mutations, the problems with shared mutable state and null values, and how monads support mapping and lifting values to address these issues. Examples of applying these concepts in JavaScript are also mentioned.
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
#7: There are two ways to get a value out of a function
-- Return path
-- Exception path
#9: 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