Series: Angelia
haskell
7 lines
· Updated 2026-02-03
Fibonacci.hs
Angelia/Haskell/Fibonacci.hs
module Fibonacci where
fibonacci :: Integer -> Integer
fibonacci n
| n < 0 = error "fibonacci: negative input"
| n == 0 = 0
| n == 1 = 1
| otherwise = fibonacci (n - 1) + fibonacci (n - 2)
Related articles
Angelia
haskell
Updated 2026-02-03
Adding.hs
Adding.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Adding.hs).
Read article →
Angelia
haskell
Updated 2026-02-03
Area.hs
Area.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Area.hs).
Read article →
Angelia
haskell
Updated 2026-02-03
Chess.hs
Chess.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Chess.hs).
Read article →
Angelia
haskell
Updated 2026-02-03
ChessGraphics.hs
ChessGraphics.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/ChessGraphics.hs).
Read article →
Angelia
haskell
Updated 2026-02-03
Examples.hs
Examples.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/Examples.hs).
Read article →
Angelia
haskell
Updated 2026-02-03
GPACalculator.hs
GPACalculator.hs — haskell source code from the Angelia learning materials (Angelia/Haskell/GPACalculator.hs).
Read article →