I am trying to figure out how many digits the 500th Fibonacci number is:
fib n = fibs (0,1) !! n where fibs (a,b) = a:fibs(b,(a+b)) length (show (fib 500))
This does work. Is there a way to get rid of the parenthesis in the third line? Say
length . show . fib 500 or something alike?
This dollar-form works too:
length $ show $ fib 500
Generally, what is the recommended way in this situation?