Why are Promises Monads?
I've been learning about functional programming and have come across Monads, Functors and Applicatives. From my understanding the following definitions apply: a) ( A=>B ) => C[A] => C[B] | Functor b) ( A=>C[B] ) => C[A] => C[B] | Monad c) ( C[A=>B] ) => C[A] => C[B] | Applicative (reference: https://thedet.wordpress.com/2012/04/28/functors-monads-applicatives-can-be-so-simple/ ) Furthermore, I understand a Monad is a special case of a Functor. As in, it applies a function that returns a wrapped value to a wrapped value and returns a wrapped value. When we use Promise.then(func) , we are