August 2018
— Didn't get this
Promise.resolve(2) .then(() => Promise.resolve(4))
Promise { 4 }
Promise { Promise { 4 } }
— So the last resolve looses its context
— Monad -> plain value
— Illegal!
— Unit = Promise.resolvebind = then
— For promises, yes
— For monads, no
— Oh?
— Wrong
— Promise.resolve does return a promise
— Just that the chain looses its context because Promises flatten