The Scheme Programming Language says
Scheme allows the continuation of any expression to be captured with the procedure
call/cc.call/ccmust be passed a procedurepof one argument.call/ccconstructs a concrete representation of the current continuation and passes it top. The continuation itself is represented by a procedurek. Each timekis applied to a value, it returns the value to the continuation of thecall/ccapplication. This value becomes, in essence, the value of the application ofcall/cc. Ifpreturns without invokingk, the value returned by the procedure becomes the value of the application ofcall/cc.
Are the two following ways of defining p equivalent, as far as being called by call/cc is concerned:
preturns without invokingk,pcallskwith its otherwise return value?
I am not sure how call/cc is defined.
Does call/cc ever directly call the continuation k, besides indirectly via p calling k?
Is it perfectly fine that both call/cc and p don't invoke continuation k?