User loginNavigation |
Background of call/ccTrying to get to grips with continuations I was looking at Scheme's call/cc (not being a Scheme programmer). I think I have a sufficient idea what a continuation is, I think of it as a snapshot of the current call stack. My question now is specifically, why do I have to provide a function argument to call/cc, what is the rational for this design? Why doesn't call/cc just return the current continuation as a value, so I could do whatever I please with it (store it, call it, pass it around, etc.)? On this page, it talks about "Essentially it's just a clean way to get the continuation to you and keep out of the way of subsequent jumps back to the saved point.", but I'm not getting it. It seems unnecessarily complicated. Can anybody enlighten me? By thomash at 2009-09-13 02:03 | LtU Forum | previous forum topic | next forum topic | other blogs | 4333 reads
|
Browse archivesActive forum topics |
Recent comments
2 hours 13 min ago
3 hours 19 min ago
5 hours 42 min ago
15 hours 6 min ago
19 hours 30 min ago
20 hours 49 min ago
21 hours 36 min ago
22 hours 23 min ago
22 hours 26 min ago
1 day 4 hours ago