El 5 de mayo de 2010 08:00, Christian Jaeger <span dir="ltr"><<a href="mailto:chrjae@gmail.com">chrjae@gmail.com</a>></span> escribió:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">> Are the results of forced delayed computations memoized in Gambit?<br>
<br>
</div>Gambit follows R5RS. See the description of force at<br>
<a href="http://people.csail.mit.edu/jaffer/r5rs_8.html#SEC64" target="_blank">http://people.csail.mit.edu/jaffer/r5rs_8.html#SEC64</a><br>
<div class="im"><br>
> If so, is this a recommended method for memoization?<br>
<br>
</div>It is the recommended method to write code using call by need, no more, no less.<br>
<br>
Call by need means, the evaluation of an expression from a particular<br>
runtime context is only being done if the result of the expression is<br>
needed, and thanks to the implicit memoization, it is only being done<br>
once even if the result (of that same expression from the same<br>
context) is needed several times.<br>
<br>
It does not however mean that the same promise (and hence memoized<br>
result) will be reused if you happen to want the result of the same<br>
expression but in a new runtime context, even if the context consists<br>
of the same values as earlier.<br>
<br>
Ch.<br></blockquote><div><br></div><div><br></div><div><br></div><div>Oh, it's pretty clear in R5RS. I read about this stuff somewhere else where it said that it depended on the implementation.</div><div><br></div><div>

Thanks,</div><div><br></div><div>Álvaro</div><div> </div><br>