
7 Jan
2008
7 Jan
'08
2:19 p.m.
Yes. It's simply impossible. The Stack data type can't be turned into a monad. Why not? Surely this is just a variation on the theme of a state monad?
Because it can't be turned into a functor. You can't, given a function a -> b, construct a function Stack a -> Stack b. On the contrast, you can easily construct a function State z a -> State z b.