On Wed, Nov 24, 2010 at 7:08 PM, Antoine Latter <[email protected]> wrote:
> I meant that 'pop' and 'push' should have been written with 'modify', 'get',
> and 'set' instead of the raw constructor, not as a drop-in replacement.

Indeed, you can also use the 'state' function instead of the 'State'
constructor in your definition of 'pop'.

'state' and the other "constructor functions" like 'reader' and
'writer' were introduced in mtl-2 to make the transition from mtl-1
easier.

Regards,

Bas
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to