
2 Jul
2004
2 Jul
'04
7:58 a.m.
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: do cont1 cont2 cont3 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 something else. so: is it possible to write cont1 etc... ? can anybody tell me what its type would be? Keean.