content: lucky :: (Integral a) => a -> String
  lucky 7 = "LUCKY NUMBER SEVEN!"
  lucky _ = "Sorry, you're out of luck, pal!"
  
  sayMe:: (Integral a) => a -> String
  sayMe 1 = "One!"
  sayMe _ = "Not 1"
  
  factorial :: (Integral a) => a -> a
  factorial 0 = 1
  factorial n = n * factorial (n - 1)
  
  charName :: Char -> String
  charName 'a' = "Albert"
  
  addVectors :: (Num a) => (a, a) -> (a, a) -> (a, a)
  addVectors a b = (fst a + fst b, snd a + snd b)
  
  addVectors' :: (Num a) => (a, a) -> (a, a) -> (a, a)
  addVectors' (x1, y1) (x2, y2) = (x1 + x2, y1 + y2)
  
  first :: (a, b, c) -> a
  first (x, _, _) = x
  
  second :: (a, b, c) -> b
  second (_, y, _) = y
  
  third :: (a, b, c) -> c
  third (_, _, z) = z
  
  head' :: [a] -> a
  head' [] = error "Can't call head on an empty list, dummy!"
  head' (x:_) = x
  
  tell :: (Show a) => [a] -> String
  tell [] = "empty"
  tell [x] = "one element: " ++ show x
  tell [x,y] = "two elements: " ++ show x ++ show y
  tell (x:y:_) = "long list; the first two elements are: " ++ show x ++ show y
  
  length' :: (Num b) => [a] -> b
  length' [] = 0
  length' (_:xs) = 1 + length' xs
  
  sum' :: (Num a) => [a] -> a
  sum' [] = 0
  sum' (x:xs) = x + sum' xs
  
  firstLetter :: String -> String
  firstLetter "" = "Empty string, whoops!"
  firstLetter all@(x:xs) = "The first letter of " ++ all ++ " is " ++ [x]
  
  bmiTell :: (RealFloat a) => a -> a -> String
  bmiTell weight height
    | weight / height ^ 2 <= 18.5 = "underweight!"
    | weight / height ^ 2 <= 25.0 = "normal"
    | weight / height ^ 2 <= 30.0 = "fat!"
    | otherwise = "whale!"
  
  max' :: (Ord a) => a -> a -> a
  max' a b
    | a > b = a
    | otherwise = b
  
  compare' :: (Ord a) => a -> a -> Ordering
  compare' a b
    | a > b = GT
    | a == b = EQ
    | otherwise = LT
  
  bmiTell' :: (RealFloat a) => a -> a -> String
  bmiTell' weight height
    | bmi <= skinny = "underweight!"
    | bmi <= normal = "normal"
    | bmi <= fat = "fat!"
    | otherwise = "whale!"
    where bmi = weight / (height ^ 2)
          (skinny, normal, fat) = (18.5, 25.0, 30.0)
  
  initials :: String -> String -> String
  initials first last = [f] ++ ". " ++ [l] ++ "."
    where (f:_) = first
          (l:_) = last
  
  calcBmis :: (RealFloat a) => [(a, a)] -> [a]
  calcBmis xs = [bmi w h | (w, h) <- xs]
    where bmi weight height = weight / height ^ 2
  
  cylinder :: (RealFloat a) => a -> a -> a
  cylinder r h =
    let sideArea = 2 * pi * r * h
        topArea = pi * r^2
    in sideArea + (2 * topArea)
  
  calcBmis' :: (RealFloat a) => [(a, a)] -> [a]
  calcBmis' xs = [bmi | (w, h) <- xs, let bmi = w / h^2]
  
  calcBmis'' :: (RealFloat a) => [(a, a)] -> [a]
  calcBmis'' xs = [bmi | (w, h) <- xs, let bmi = w / h^2, bmi >= 25.0]
  
  head'' :: [a] -> a
  head'' xs = case xs of [] -> error "empty list!"
                         (x:_) -> x
  
  describeList :: [a] -> String
  describeList xs = "The list is " ++ case xs of [] -> "empty."
                                                 [x] -> "a singleton list."
                                                 xs -> "a longer list."
  
  describeList' :: [a] -> String
  describeList' xs = "The list is " ++ what xs
    where what [] = "empty."
          what [x] = "a singleton list."
          what xs = "a longer list."
  