News for hackers. Stuff that matters.
Re:Monads Are Not Metaphors (2010) by olavk on Thursday September 10, 2015 @04:57PM (#10200519)
How are JS promises monads?
Re:Monads Are Not Metaphors (2010) by tikhonj on Thursday September 10, 2015 @06:08PM (#10200868)
They actually operate on more or less the same principle as Async and LWT, similar to Haskell's Cont.

The .then method is bind. Or it would be if they didn't automatically flatten nested promises. Since they do, then is a hybrid of map and bind that doesn't quite cover the use cases for both.