
5 Jan
2009
5 Jan
'09
7:06 a.m.
On Mon, 5 Jan 2009, Ross Paterson wrote:
On Mon, Jan 05, 2009 at 09:32:21AM +0100, Henning Thielemann wrote:
I also like to have a function 'state', which replaces the former 'State' constructor. I can also submit a patch if you want that.
You mean
state :: (s -> (a, s)) -> State s a state f = StateT (Identity . f)
and similarly for all the others? Sounds reasonable.
You have already added them, thanks! Maybe you can even add 'stateT' and the likes in order to give programmers a way of staying independent from the particular definition of StateT.