by justinethier · 10y ago · 0 comments
This might help with continuations: https://en.wikipedia.org/wiki/Continuation
Here is a really simple example of simulating a C return using call/cc:
(display
(call/cc
(lambda (return)
(display "hello ")
(return "world")
(display "never reached"))))If you just want the simple explanation: A continuation is a copy of the return stack at the instant it was captured. When a continuation is invoked, that copy replaces the stack.