Login | Register

RoboZZle Forums

Forums / General / call/cc

Log in to comment.

I'm thoroughly confused.

recursive, 50 months ago.

(Thought, unlike call/cc, a 'return' block is practical and might be a very interesting addition.)

blake, 50 months ago.

I was mostly being flip, but no, call/cc is a Scheme-ism, the building block for creating any new flow control construct you might like. In short, call/cc calls takes a procedure as it's only argument and calls it passing a procedure that represents the current continuation as a parameter. The continuation is the entire rest of the computation from where it was captured - invoking it resumes there, with that original stack, etc. It's a bit like setjmp/longjmp, except you can call it more than once, the setjmp might have been captured lower on the stack than the longjmp.

blake, 50 months ago.

This is the first time that I am hearing about call-with-current-continuation, but I skimmed the Wikipedia page. :-)

So, are you basically suggesting a command corresponding to the "return" statement in a typical programming language?

igoro, 51 months ago.

Seemed a shame for this empty forum to be lurking at the bottom of the page - so, since we are busily creating our own control constructs let me be the first to request a call-with-current-continuation block for some future version.

blake, 51 months ago.

Previous page (1 / 1) Next page

©2009 Igor Ostrovsky and other contributors. Terms of use