El 5 de mayo de 2010 15:21, Christian Jaeger chrjae@gmail.com escribió:
In addition to the things mentioned in R5RS that may be implemented differentely between implementations, you also find this:
- whether calling force on a nested promise evaluates only one level
or all levels
Also note that the example implementation given in R5RS is not safe for space in the sense that it doesn't release the thunk of the promise before finishing its evaluation, which leads to similar problems as missing tail-call optimization. I don't know whether any Scheme implementation *is* safe for space in this regard. So the recommendation I gave before is the generally given recommendation, not my personal--I personally generally use my own implementation of delay and force.
Ch.
Hi Christian,
Thanks again for the explanation. Is your implementation sharable or maybe you could give me some pointers?
I'm currently trying out with this other approach (the hashtable), different from force/delay.
http://community.schemewiki.org/?memoization
Bests,
Álvaro