Created
November 22, 2012 00:44
-
-
Save arnihermann/4128738 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List (findIndex) | |
import Data.Maybe (maybe) | |
main = do | |
let fibs = 0 : 1 : zipWith (+) fibs (tail fibs) | |
idx = findIndex (\n -> length (show n) == 1000) fibs | |
putStrLn $ maybe "no fib found" show idx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment