
16 Jun
2012
16 Jun
'12
10:57 a.m.
* Anton Kholomiov
It's class for strict and lazy states. Maybe it's better to take approach of containers (the same interface and different modules)?
The lazy and strict State monads differ only in their >>= operator. Since you don't have control over importing the Monad instance, those two have to be different types. The reason why put/get/modify are in a class is to allow them to be used not just with State, but also with any monad stack that has a State inside, like `ReaderT e (State s)`. -- Roman I. Cheplyaka :: http://ro-che.info/