-- Based on https://wiki.haskell.org/Haskell_Tutorial_for_C_Programmers

main :: IO ()
main = do
  print "The value of `foo bar` where `bar = 10` is: \n"
  print $ foo 10
  print "`fib n` where `n = 100` is: "
  print $ fib 100
  print $ take 10 fibs

foo :: Integer -> Integer
foo bar = bar * 10 + 4

fib :: Integer -> Integer
fib n = fibGen 0 1 n

fibGen :: Integer -> Integer -> Integer -> Integer
fibGen a b n = case n of
  0 -> a
  n -> fibGen b (a + b) (n-1)

fibs :: [Integer]
fibs = 0 : 1 : [a + b | (a, b) <- zip fibs (tail fibs)]
