Hi Alex,<br><br>In Haskell, data structures cache, while functions do not.<br><br>&quot;Memoization&quot; is conversion of functions into data structures (and then trivially re-wrapping as functions) so as to exploit the caching property of data structures to get caching functions.<br>

<br>  - Conal<br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 11:03 AM, Alex Rozenshteyn <span dir="ltr">&lt;<a href="mailto:rpglover64@gmail.com">rpglover64@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

I feel that there is something that I don&#39;t understand completely:  I have been told that Haskell does not memoize function call, e.g.<div>&gt; slowFib 50</div><div>will run just as slowly each time it is called.  However, I have read that Haskell has call-by-need semantics, which were described as &quot;lazy evaluation with memoization&quot;</div>


<div><br></div><div>I understand that</div><div>&gt; fib50 = slowFib 50</div><div>will take a while to run the first time but be instant each subsequent call; does this count as memoization?</div><div><br></div><div>(I&#39;m trying to understand &quot;Purely Functional Data Structures&quot;, hence this question)<br clear="all">


<br>-- <br><div dir="ltr"><div>          Alex R</div></div><br>
</div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>