<div dir="ltr"><div>Awesome, thanks. I know it's boring, but I like<br></div><div><br></div><div>fib5h :: Integer -> Integer -> Stream Integer<br>fib5h n m (OHead f) = f n<br>fib5h n m (OTail o) = fib5h m (n+m) o<br>
<br>fib5 = fib5h 0 1<br></div><div><br></div><div>pretty well, and this is fast, with and without optimization.</div><div><br></div><div>Aaron</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 17, 2013 at 10:36 AM, Nils Anders Danielsson <span dir="ltr"><<a href="mailto:nad@cse.gu.se" target="_blank">nad@cse.gu.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-12-17 17:22, Aaron Stump wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since I'm not the biggest Haskeller in the world, would you mind<br>
making the complete source file you used for testing (I assume you<br>
compiled this with ghc, and have a 'main' entrypoint) available to me?<br>
</blockquote>
<br></div>
I have attached some code. You can compile it with or without<br>
optimisations:<br>
<br>
* ghc --make Test.hs -O -fforce-recomp<br>
* ghc --make Test.hs -fforce-recomp<br>
<br>
Then you can load it up in GHCi and try things like "take' 35 fib1".<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
/NAD<br>
</font></span></blockquote></div><br></div>