
5 Jul
2010
5 Jul
'10
9:27 a.m.
On 5 July 2010 11:30, Ertugrul Soeylemez
That's what monad transformers are good for. Why reinvent the wheel?
Hi Ertugrul The post was chiming in with Felipe Lessa's comment upthread that avoiding transfomers can have performance benefits. Whether the formulation I gave is particulary efficient is moot - I'd have to give consideration to the strictness of the state at least - but I was answering Yves Parès about "how" you would do it, rather than "why". Given the status of MTL, I nowadays avoid transformers for pragmatic reasons rather than performance ones. If I have substantial code I'll rely on Iavor S. Diatchki's very nice MonadLib, but for small projects I'll just roll an amalgamated monad.