I implement here the proposed primitive with standard scheme primitives. I have introduced a new Scheme module for synergy in my module system here. In the code below “Seal” is bound to the value of:
(lambda () (let ((thePayload '()) (hasPayload #f))
(cons (lambda (payload) (lambda () (set! thePayload payload) (set! hasPayload #t)))
(lambda (box) (set! hasPayload #f) (box) (if hasPayload thePayload #f)))))
Just now I begin to worry about not throwing an exception upon false box.
I need that even for my HSet application!
http://blog.gmane.org/gmane.comp.capabilities.general/month=20110401
CapTheory/Synergy/E.html