Talk:Euler problems/21 to 30

From HaskellWiki
< Talk:Euler problems
Revision as of 13:06, 19 November 2008 by Rvodden (talk | contribs) (Error in code for Problem #25)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Problem #25 has a typo. The code which generates the fibonacci sequence is incorrect. As show it says:

fibs = 1 : 1 : 2 : zipWith (+) fibs ( tail fibs )

which actually generates:

1,1,2,2,3,4,5,7,9...

In fact the code should read:

fibs = 1 : 1 : zipWith (+) fibs ( tail fibs )

Which generates the correct sequence.