
9 Jan
2011
9 Jan
'11
7:43 a.m.
On Sunday 09 January 2011 11:47:40, Arlen Cuss wrote:
Hi all,
Thanks for previous help on this list! I really appreciate it.
Today I wrote a monad and I'm not sure if I took a complicated way about it. It's essentially a State monad, except with some specialised functions that operate on the `state' if you will (though the state is rarely mutated)
If it is not mutated at all (which seems not entirely unlikely with a pair (stdin,stdout) of Handles), you should use ReaderT (Handle,Handle) IO instead of StateT (Handle,Handle) IO btw. Cheers, Daniel