This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How often are continuations created?


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> But in any correct implementation of letrec, it is still OK to keep
> the bindings on the stack.

No.  Consider:

(letrec ((x 2) (y 3))
  (call/cc (lambda (k) (set! save-cont k)))
  (set! x 3)
  (set! y 4))

If save-cont is invoked, x and y must have the updated values.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]