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.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to