Skip to content

Instantly share code, notes, and snippets.

@danidiaz
Created August 23, 2013 17:05
Show Gist options
  • Select an option

  • Save danidiaz/6321659 to your computer and use it in GitHub Desktop.

Select an option

Save danidiaz/6321659 to your computer and use it in GitHub Desktop.
State monad: Lazy vs. Strict
-- 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