Created
August 23, 2013 17:05
-
-
Save danidiaz/6321659 to your computer and use it in GitHub Desktop.
State monad: Lazy vs. Strict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Fails with Control.Monad.State.Strict | |
| -- Works with Control.Monad.State.Lazy | |
| evalState (undefined >> put 'a' >> get ) 'c' | |
| -- See on SO: http://stackoverflow.com/questions/13186512/difference-between-haskells-lazy-and-strict-monads-or-transformers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment