
17 Jan
2011
17 Jan
'11
7:27 p.m.
On Mon, Jan 17, 2011 at 7:24 PM, Jan-Willem Maessen
Using these definitions, and join = (>>= id), we obtain:
join (CPS cca) = CPS (\k -> cca (\ca -> unCPS ca k))
That is, we construct a fresh continuation that we pass to cca, that receives the computation ca returning an a, and invokes ca with continuation k. I believe this is rather different from your definition, as the type of the continuation that we pass to cca is (say) a -> r in the above definition, but is a -> a in yours.
Argh, I meant ca -> r and ca -> ca in the types above. Which just goes to show, I suppose. -Jan