4 Fév
2011
4 Fév
'11
08:38
Hello, answering to myself:
How to restore the stack correctly when jumping to a continuation?
After some observation, I decided that GVM code has the property: values in the stack are read-only. Therefore, call/cc makes a copy of the stack, and a jump to a continuation restores this copy. Maybe this solution is not optimal, but it works at least for the yin-yang puzzle. (http://en.wikipedia.org/wiki/Call-with-current-continuation )
-- Oleg Parashchenko olpa@ http://uucode.com/ http://uucode.com/blog/ XML, TeX, Python, Mac, Chess