Monads

Mark Carroll mark at chaos.x-philes.com
Wed Dec 31 19:17:34 EST 2003


Omitting the typeclass bit, I'm trying to write something like
(s1 -> s2) -> StateT s1 m () -> StateT s2 m a -> StateT s1 m a

That is, it sequences two StateT computations, providing a way to
translate from the first's state to the second to keep the chain
going.

I can easily write something for when s1 and s2 are the same, and my
understanding of much of Control.Monad.* remains tenuous at best, but if
it's easy for anyone to provide me with some tips, then I thought I should
mention that it'd certainly be helpful.

And Happy New Year, everyone!

-- Mark


More information about the Haskell-Cafe mailing list