Noah Lavine <noah.b.lav...@gmail.com> writes: > Okay, let me see if this is right now. > > In the expression > > (list (call-with-current-continuation func) (+ 4 14)), > > you want the addition to be done before the > call-with-current-continuation, as opposed to being part of the > continuation. > > Right?
This is part of it, yes. If you think as "(list expr1 expr2 ...)" as (call-with-values (parallel expr1 expr2 ...) list) and each of the expr might suspend its thread (and record the thread somewhere for waking up), then you have parallel execution that continues until all paths have reached completion or suspension. Now instead of parallel execution, it would be ok to have the serialization of call/cc but still continue in all paths to completion or suspension. Of course, a single call/cc just stores away a single continuation, and whatever continuation while evaluating "list" was reached, one can't prod Scheme into taking up another branch without letting that continuation continue, so obviously something is missing in this picture. -- David Kastrup