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

Because the token is passed only within the implementation of `>>=`, which is private to the IO module, you never have access to it. So no need for the runtime to keep snapshots lying around.

Monads provide a way to combine them and a way to inject values into them; but not all monads provide the inspection interface that would allow you to examine that state token. The definition of a monad guarantees only the injection and the combination (the "unit" and "multiply").



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

Search: