<p>Hallo everyone,</p>

<p>as Haskell uses the Lazy Evaluation reduction policy also known as Outermost Graph Reduction, I was wondering if the following simple implementation of the Fibonacci sequence would result in linear runtime behaviour.</p>

<p>fib :: Integer -> Integer<br />
fib 0 = 0<br />
fib 1 = 1<br />
fib n = fib (n - 2) + fib (n - 1)</p>

<p>Is the following reduction sequence realistic, or am I admitting to much intelligence to the Haskell Compiler?</p>

<a href="http://www.bilder-hochladen.net/files/bxlk-6-jpg.html" target="_top" rel="nofollow"><img src="http://www.bilder-hochladen.net/files/thumbs/bxlk-6.jpg" border=0></a>

I hope someone can help...
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Reduction-Sequence-of-simple-Fibonacci-sequence-implementation-tp25178377p25178377.html">Reduction Sequence of simple Fibonacci sequence implementation</a><br>
Sent from the <a href="http://www.nabble.com/Haskell---Haskell-Cafe-f13132.html">Haskell - Haskell-Cafe mailing list archive</a> at Nabble.com.<br>