Hacker News new | comments | show | ask | jobs | submit login

That's basically what the promises spec for Javascript gives you.

Exactly. The promises spec defines the Promise monad. The problem is that JavaScript doesn't have monadic syntax, which would make the code a lot more readable.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact