<div class="gmail_quote"><br>It is not repeated because fiblist is pure and has no arguments. Otherwise it would be repeated. </div><div class="gmail_quote"><br></div><div class="gmail_quote"><br><br><div class="gmail_quote">

2010/8/14 Tako Schotanus <span dir="ltr">&lt;<a href="mailto:tako@codejive.org" target="_blank">tako@codejive.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><div>I was reading this article:</div><div><br></div><a href="http://scienceblogs.com/goodmath/2009/11/writing_basic_functions_in_has.php" target="_blank">http://scienceblogs.com/goodmath/2009/11/writing_basic_functions_in_has.php</a><br clear="all">

&gt; fiblist = 0 : 1 : (zipWith (+) fiblist (tail fiblist))
</pre><div><br></div></span></div><div>Very interesting stuff for somebody who comes from an imperative world of course.</div><div>But then I read that &quot;<span style="font-family:&#39;Trebuchet MS&#39;, Arial, Verdana, Geneva, Helvetica, sans-serif;font-size:12px;line-height:16px">Once it&#39;s been referenced, then the list up to where you looked is concrete - the computations <em style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:0px;outline-style:initial;outline-color:initial;font-size:12px;vertical-align:baseline;background-color:transparent;background-repeat:initial initial">won&#39;t</em> be repeated.</span>&quot;</div>

<div>and I started wondering how that works.</div><div>Because this seems to mean that functions could have unknown (to the caller) memory requirements.</div>

<div>How does one, programming in Haskell, keep that in check?</div><div>And when does that memory get reclaimed?</div><div><br></div><div>Cheers,<br>-Tako<br>
</div>
<br></div></div><div class="im">_______________________________________________<br>