Re: Continuation sets and order-independency

2012-01-13 Thread Mark H Weaver
David Kastrup writes: > I assume that the above list could contain more than a single call of > (suspend). Yes, of course. >> For example, (%% list 1 2 3 (begin (suspend) 4) 5) expands to: >> >> (call-with-values >> (lambda () (parallel (suspendable list) >>(s

Re: Continuation sets and order-independency

2012-01-13 Thread David Kastrup
Mark H Weaver writes: > I'm still not entirely clear on what you want, Well, I said there were elements missing in the picture, so it is not like I am entirely clear on it myself. > but perhaps you're looking for delimited continuations, a.k.a > composable continuations, partial continuations,

Re: Continuation sets and order-independency

2012-01-09 Thread Mark H Weaver
Hi David, David Kastrup writes: > Noah Lavine 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

Re: Continuation sets and order-independency

2012-01-08 Thread David Kastrup
Noah Lavine 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 par

Re: Continuation sets and order-independency

2012-01-07 Thread Noah Lavine
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? Noah On Wed, Jan 4, 2012 at 9:00 AM, David Kastrup

Re: Continuation sets and order-independency

2012-01-04 Thread David Kastrup
Noah Lavine writes: >> On Wed, Jan 4, 2012 at 8:16 AM, David Kastrup wrote: >>> >>> Hi, >>> >>> I was just wondering about the ability for using multiple continuations >>> in contexts that don't guarantee an order of execution.  Functions like >>> map, list and other structure builders. >>> >>>

Re: Continuation sets and order-independency

2012-01-04 Thread Noah Lavine
Let me see if I understand what you mean. I think you're talking about an expression like this: (cons (call/cc store-this-continuation) (call/cc store-this-continuation)) and you want a way to distinguish the first and the second call/cc, by guaranteeing the order they are hit. This will let yo

Continuation sets and order-independency

2012-01-04 Thread David Kastrup
Hi, I was just wondering about the ability for using multiple continuations in contexts that don't guarantee an order of execution. Functions like map, list and other structure builders. If one uses those for building a structure, and some paths of execution hit a call-with-current-continuation