Mon Apr 28 15:38:55 EDT 2008

destructive assignments

so.. why am i doing this? suppose one takes a partial continuation
which has state, does it hang on to this?

(define ((integrate state) in)
  (set! state (+ state in))

(define k (reset (let ((x (integrate 0))) (x (shift k k)))))

box> (k 1)
box> (k 1)
box> (k 1)
box> (k 1)

yes: multiple executions of the partial continuation keep their
state. why would they do otherwise? that's the dragon i'm fighting: i
need an abstraction where the partial continuations are pure

the important remark here, also related to finding a decent
abstraction instead of the breakpoint one: what i'm doing is
'splitting' a composition. maybe i should go back to that, istead of
the mixer/update abstraction?

basicly, something like
  (a b c | d e f | h i j) with-split

   -> (abc def hij)

the funny thing is, trying to just

  split = (lambda (x) (shift k (cons k x)))

doesn't give a list, a pair with value and continuation, which in turn
produces a pair with value and continuation.