[Haskell-cafe] Monad transformer to consume a list
Stephan Friedrichs
deduktionstheorem at web.de
Wed Apr 8 03:31:31 EDT 2009
Henning Thielemann wrote:
> [...]
>
> But this is precisely the StateT, wrapped in a newtype and with
> restricted operations on it. You could as well define
>
> newtype ConsumerT c m a =
> ConsumerT { runConsumerT :: StateT [c] m a }
Oh I see - my bad. I was somehow thinking I could prevent modification
of the input list but that's obviously impossible when the ConsumerT
constructor is... exported? public? how do you say that?
> [...]
//Stephan
--
Früher hieß es ja: Ich denke, also bin ich.
Heute weiß man: Es geht auch so.
- Dieter Nuhr
More information about the Haskell-Cafe
mailing list