Skip to content

Instantly share code, notes, and snippets.

@arnihermann
Created November 22, 2012 00:44
Show Gist options
  • Save arnihermann/4128738 to your computer and use it in GitHub Desktop.
Save arnihermann/4128738 to your computer and use it in GitHub Desktop.
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