[racket] discarding initialization with delay + reset

From: Keiko Nakata (keiko at kurims.kyoto-u.ac.jp)
Date: Mon Oct 18 06:52:35 EDT 2010

Hello,

Can I regard this behavior as intended semantics?

(let* ([x0 (delay (control k I))]
       [x1 (delay (force x0))])
  (reset (force x1)) (force x1) 0)

raises an error 'force: reentrant promise x1'.

I speculate that an operation of 'update x1' is captured therefore discarded.
But how this is implemented?  
Do you have a reference implementation or something that I can consult?

Sorry for my making-no-sense examples.
--- I get inspiration from Racket to engineer my language :)


Keiko













Posted on the users mailing list.