Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The monad laws are defined in terms of equivalence of values. So if your promise is not a value then you can't even begin to talk about whether it conforms to the monad laws or not. If `Promise(someWebRequest())` starts performing the web request immediately then we can't talk about it as a value (or rather, in order to regard it as a value we have to elide some aspects of it that are actually quite crucial, such as the web request being performed).


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

Search: