Posts RSS Comments RSS 227 Posts and 290 Comments till now

Recap! What’s the stack pointer?

Emma Cunningham: ok, so the million-dollar question: what do you do with a continuation?
Aidan Kehoe: the only good answer I’ve seen to that has been from Paul Graham*

And, of course, from Chris Barker and Chung-chieh Shan re: natural language semantics, teehee.

(Thanks again, Aidan, for your lovely explanation of continuations!)

*This is funny. I mention this only because I’m sure the non-Lispers of you reading this are probably thinking Why did she make a post out of this? So I explain, it’s funny. That’s why.

One Response to “Recap! What’s the stack pointer?”

  1. on 13 Mar 2007 at 9:48 amAidan Kehoe

    What language are you using them with? I didn’t understand how to use them in Scheme (and other languages with call/cc) until a few minutes ago, but this guy explains it well:

    You usually have some function named call/cc (in Scheme) or callcc or whatever. This function just calls another function and passes on the current continuation - the point in control flow that will be executed on return from the call/cc call. The called function now can store this continuation somewhere and [any part of the program can] later [resume that continuation; just invoking it as a function, in Scheme] to transfer back to the original function.

Trackback this post | Feed on Comments to this post

Leave a Reply