1. On paper, rewrite these expressions using Haskell function call syntax:
    f(x) * a == g(a) + c
    
    f x * a == g a + c
    h(f(a) + g(x-y))
    h (f a) + g (x - y)
    f(g(a*-b)-h(b))
    f (g (a * -(b))) - h b
  2. Try :type pi and :type minBound. Are they functions?
    :type shows that those names are bound to values, not functions
  3. Try these expressions, which use :: to request that the value have a specific type.
    minBound::Char
    maxBound::Bool
    maxBound::Int
    maxBound::Integer (it's an error, but why?)
    
    maxBound is defined in the type class Bounded but the type Integer is not an instance of that type class
  4. Try the function defintions on slide 65 and then write some single-argument functions:
    isZero1 x = x == 0 isZero2 x = x == 0.0 isNonZero x = not (isZero1 x) -- note use of not ltRecip x = x < recip x ltSelf x = x < x isIOU c = c == 'I' || c == 'O' || c == 'U' notIsIOU c = not (isIOU c) -- note use of not area r = pi * r ^ 2
  5. Define functions f1 through f6 whose types are inferred to be the following. The functions don't need to perform any meaningful computation—only the type matters. You may NOT use ::type (as shown on slide 66) to force types.
    f1 :: Eq a => a -> Bool
    f2 :: Num a => t -> a
    f3 :: Fractional a => t -> a
    f4 :: Int -> Int
    f5 :: (Bounded a, Ord a) => a -> Bool
    f6 :: (Bounded a, Eq a) => a -> Bool
    
    f1 x = x == x f2 x = 10 f3 x = 1.0 f4 x = ord 'a' + x -- assumes 'import Data.Char' at top of file f5 x = x > minBound f6 x = x == minBound