[Haskell-cafe] state in the continuation monad...
MR K P SCHUPKE
k.schupke at imperial.ac.uk
Fri Jul 2 07:58:00 EDT 2004
I am trying to model state in the continuation monad,
such that each continuation recieves the current state
as one of its arguments. The state must vary in type,
which is why I am trying to use the continuation monad,
but things don't seem to be going too well.
To clarify... imagine the following sequence:
we may want the implicit parameter for cont1 to be an
Int, but for it to pass a String to cont2 which
passes (String,Int) to cont3 which finally returns
so: is it possible to write cont1 etc... ?
can anybody tell me what its type would be?
More information about the Haskell-Cafe