Haskell — Fibonacci again

Write a function fib :: Int -> Integer that, given a natural nn, returns the nn-th element of the Fibonacci sequence.

Scoring

Problem information

Author: Unknown
Translator: Jordi Petit

Generation: 2026-02-03T17:02:45.660Z

© Jutge.org, 2006–2026.
https://jutge.org