16 Jun
2012
16 Jun
'12
2:57 p.m.
* Anton Kholomiov <anton.kholomiov@gmail.com> [2012-06-16 17:59:23+0400]
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/