[Haskell-beginners] [Haskell-cafe] For Euler 25; What is the first term in the Fibonacci sequence to contain 1000 digits?; the following seems to work.

Felipe Almeida Lessa felipe.lessa at gmail.com
Thu May 19 22:04:20 CEST 2011


On Thu, May 19, 2011 at 5:00 PM, KC <kc1956 at gmail.com> wrote:
> Project Euler wants the term number not the actual Fibonacci number.

Just put the mapped function 'fib' inside the filter =).

  head . filter ((==1000) . length . show . fib) [0..]

Cheers,

-- 
Felipe.



More information about the Beginners mailing list